How to correctly model multiplicity (multi-instance) of a BPMN Lane? - enterprise-architect

To start with, my question is related (a follow-up) to this older question:
Multiple instances on a lanes BPMN
I'm interested in the topic of the above-referenced question, but as I read it from the referenced OMG BPMN 2.0(.2) standard, this multiplicity possibility for a Participant only applies to Pools, and not to Lanes.
Furthermore, my modeling tool (Sparx EA v15) also doesn't give me any option to set multiplicity for a Lane.
Does anyone know how to correctly (according to the BPMN 2.0(.2) standard) model multiplicity for Lanes?
Example modeling challenge: Several different employees (different resources/persons), with the same internal role (Technical Advisor), need to assess a document and handover an assessment report before the document can become final.
If these technical advisors where external to the main Pool (=PartnerEntity = division within a big organisation) an external pool called 'Technical Advisor' (=PartnerRole) could be modeled as multi-instance (participantMultiplicity = true) to obtain the desired outcome.
The challenge however is that the persons/resources fulfilling the 'technical advisor' role are all internal to the main Pool (are an employee within the division), and thus need to be modeled as (a) Lane(s). Because the number of involved technical advisors can differ between process instances, it is not preferable to model more than 1 Lane for this, and it appears very much preferable to model it very similar to the 'multi-instance' possibility that can be modeled for (external) Pools.
I hope anyone can help me with this modeling challenge, this would be very much appreciated!
DEN
P.S.1 Follow-up information regarding Gerd's 'Nested Pool' suggestion, see image underneath.

I am not quite sure how to interpret the BPMN standard at this point but would assume that the modeling tool is correct in not letting you set a multiplicity on a lane. However, both Sparx EA and bpmn.io do allow you to nest elements (see also this thread on the bpmn.io forum with an example with nested lanes).
So my idea would be to model the technical advisor role as a pool (rather than a lane) inside the main pool. Then you can set the multiplicity on that internal pool like this:

Related

Can I just use the packages in my package diagram as the entities for my class diagram?

We need to create a booking system that allows rape victims to book sessions with a counsellor (who is a volunteer therefore is not on duty 24/7) online. The organisation used to do the booking process over the phone, writing down important information.
This is the package diagram I created for a project. I am not sure: am I allowed to just use the packages as entities for the class diagram?
A package is a tool to structure models by grouping somehow related pieces into namespaces.
It is not unusual to recognize a decomposition that coincides somehow with larger components (e.g. Client, Application and Data). But it is not correct to use packages as a substitute for a class. It may even look confusing.
It is not a problem to keep enclosing or nested packages such as Booking system in a class diagram. But you should use a proper class box for classes. You would then be able to show not only the properties but also the operations in a different compartment. Last but not least, you could be more precise in the relationships between classes, considering that packages are only related via dependencies and some special package operations, whereas classes can be related also with associations, inheritance, etc..
For example, your diagram tells only that Booking is dependent on Client. And this means the content of one package needs to know about the other packages. But in reality Client and Booking should be associated i.e. an instance of Client would be related for a longer time to some specific instances of Booking. In this case, you'd expect that you could easily navigate from the one to the other. Associations also allow to specify multiplicity, e.g. that one client could have 1 or more bookings, but each booking would be for only one client.
Other remarks, unrelated to the question:
Your comment box suggests that you try to explain the purpose of the system, perhaps for some stakeholders. You may therefore consider using a use-case diagram to show the big picture with the different actors and the goals they want to achieve with the system.
In a class box, you could add an «Entity» stereotype above the name of the class. Entities are domain classes that matter to the users.
Data storage system seems not to fit in the diagram: it's not really an entity. Perhaps it's a class, a component or a package, but not really an entity.

Simple view of complex UML class graph

We have a complex class model of clinical information. It's intended to support model-driven architecture, so the we can't just defer the complexity. But we also need subject matter experts to be able to review it. Is there a way in UML to create "views" like you would in SQL?
In a diagram, you show only classes you want and you get several diagrams to present all points you need.
Your UML model contains all classes, but in a diagram you present only classes you want.
There i a specific UML meta-class for your purpose : Model which inherits from Package.
"A Model is a description of a system, where ‘system’ is meant in the broadest sense and may include not only software and hardware but organizations and processes. It describes the system from a certain viewpoint (or vantage point) for a certain category of stakeholders (e.g., designers, users, or customers of the system) and at a certain level of abstraction. A Model is complete in the sense that it covers the whole system, although only those aspects relevant to its purpose (i.e., within the given level of abstraction and viewpoint) are represented in the Model." p 245
And
" A model captures a view of a physical system. It is an abstraction of the physical system, with a certain purpose. This purpose determines what is to be included in the model and what is irrelevant. Thus the model completely describes those aspects of the physical system that are relevant to the purpose of the model, at the appropriate level of detail." p 273
And it shown like :
But to do like view, meaning to present to user a "public" view of a complex model, you have to use some patterns like :
facade
mediator

Difference between "high-level" class diagram and "normal" diagram

I am a student and we have a Object-Oriented Project that we have to do to pass Object-Oriented course. My problem is to design the project. Teacher wants two different class diagram.Teacher said "One is high level, other one is normal class diagram." I know that high-level class diagram have detailed information such as attributes and methods. Additionally, I think high-level diagram covers normal diagram. What is normal class diagram? What is the difference between high-level and normal class diagram? I think that if we draw a high-level diagram normal diagram is redundant. Why Did teacher want normal diagram? I am confused.
There are typically 5 "levels" of design that one should think of, so that is where the "high-level" comes from. They are usually like this:
Software System - This is where you think of the software in terms of entire packages, or in terms of its subsystems.
Subsystems - This is the part where you ID all of the major subsystems, such as database, user interface, reporting engine, etc. This is the part where you define how each subsystem uses one another, and how they work together.
The first two are probably what your teacher meant by "High Level Design".
Classes - This further partitions the subsystems by classes. For instance, if you had a database system, you might have a class that manages the persistent connections, the metadata, etc. The way each class works with classes in other subsystems are also defined. This is probably what your teacher means by "class design".
Below that, you further divide each class into routines and internal routines, but I assume your teacher does not want you to get that detailed. However, for completion's sake, I will define them:
Routines - Design at this level includes dividing each class into routines. It is the "how" to the "what" answered in level 3.
Internal Routine - Design of the individual routines.

ORM Entities vs. Domain Entities under Entity Framework 6.0

I stumbled upon the following two articles First and Second in which the author states in summary that ORM Entities and Domain Entities shouldn't be mixed up.
I face exactly this problem at the moment as I code with EF 6.0 using the Code First approach. I use the POCO classes as entities in the EF as well as my domain/business objects. But I find myself frequently in the situation where I define a property as public or a navigation property as virtual only because the EF Framework forces me to do so.
I don't know what to take as the bottom line of the two articles? Should I really create for example a CustomerEF class for the entity framework and a CustomerD for my domain. Then create a repository which consumes CustomerD maps it to CustomerEF do some queries and than maps back the received CustomerEF to CustomerD. I thought EF is all about mapping my domain entities to the data.
So please give me some advice. Do I overlook an important thing the EF is able to provide me with? Or is this a problem which can not completely solved by the EF? In the latter case what is a good way to manage this problem?
I agree with the general idea of these posts. An ORM class model is part of a data access layer first and foremost (even if it consists of so-called POCOs). If any conflict of interests arises between persistence and business logic (or any other concern), decisions should always be made in favor of persistence.
However, as software developers we always have to balance between purism and pragmatism. Whether or not to use the persistence model as a domain model depends on a number of factors:
The size/coherence of the development team. When the whole team knows that properties can be public just because of ORM requirements, but should not be set all over the place, it may not be a big deal. If everybody knows (and obeys) that an ID property is not to be used in business logic, having IDs may not be a big deal. A scattered, unexperienced or undisciplined team may need more stringent segregation of code.
The overlap between business logic concerns and persistence concerns. Object oriented design thrives when a class model sticks to SOLID principles. But these principles are not necessarily at odds with persistence concerns. I mean that although the concerns are different, in the end their resultant requirements may be quite similar. For instance, both concerns may require valid object state and correct associations.
There can be use cases, however, in which objects temporarily need to be in a state that absolutely shouldn't be stored. This may be a reason to work with dedicated domain classes. Another reason may be that the entity model just can't fulfill the best segmentation of responsibilities. For instance, a business process "blacklisting customer" may require data that is scattered over so many entity objects that new domain classes must be designed that can encapsulate the data and the methods working on them. In other words: doing this by entities would violate the Tell Don't Ask principle.
The need for layering. For instance, if the data access layer targets different database vendors it may have to consist of interchangeable parts that are vendor-specific (e.g. to account for subtle differences in data types between Oracle and Sql Server or to exploit vendor-specific features). Using the persistence model as domain model would probably bleed vendor-specific implementations into the business logic. That would be really bad. There the data access layer should be precisely that, a layer.
(Very trivial) The amount of data. Creating objects takes time and resources. When "many" objects are involved in a business case it may just be too expensive to build both entity objects and domain objects.
And more, undoubtedly.
So I would always try to be a pragmatist. If entity classes do a decent job, go for it. If the mismatch is too large, create a business domain for appropriate parts of the business logic. I would not slavishly follow a (any) design pattern just because it is a good pattern. Contrary to what is said in the post, it requires a lot of maintenance to map an entity model onto a business model. When you find yourself creating myriads of business classes that are almost identical to entity classes it's time to rethink what you're doing.

Neo4j (or any other graph database) modeling

I'm starting to work with graph databases, and in my team we've started modeling a graph for our software. The problem comes when we try to "document" the model, to see the structure of our database. With SQL databases you only have to look at the SQL schema.
We've spent some time reading neo4j blogs and documentation, but we've seen that the usual way to show how a graph works is with a minimal graph showing some sample data (Random samples: sample1, sample2, etc). That's great for educational purposes, but we'd love to be able to do it in a little more formal way. We'd like to set what kind of node can relate with another one, and with what kind of relationship, that kind of stuff.
Using Spring you can wrap the graph with classes, but it's very specific to Java and OO model, and we're working with Erlang. We're looking for some kind of formal language (SQL Schema equivalent), or a E-R model equivalent, or something like that.
One way to do this is to put the "meta-model" of your graph (a type network) in the graph as well and then connect the instances (nodes) to their meta-model-type. So you can visualize the meta-model using the graph visualization and at the same time use the meta-model to enforce additional constraints (by storing constraint information in the meta-model and using that when the actual model is updated) and also use the type-nodes of the meta-model to quickly access all "instance"-nodes of this type.
What is the domain you want to model?
A quick idea - could you use a subset of UML? Graph modeling seems to be closer to the domain, so maybe that's reasonable.
What we do is a generalization of the "example data" approach, where we include cardinality on each side of a relationship, as well as type and direction. I also often include a node "type" in the diagram (or some other specification of it's role/relation to domain models) instead of example data, and of course note the expected properties, their types, and whether they are optional. It's less than formal, but has served well so far.