Allowing pools in subprocesses

I’ve been asked to make it possible to model pools/lanes in collapsed subprocesses, for the purpose of representing message flows. The current modeler, of course, disallows adding pools/participants in a collapsed subprocess. I’ve been going through the source code to try and find where this is defined so I can modify it with a custom renderer or something along those lines, but I can’t seem to find it. I thought it’d be in the features/rules or even in the diagram-js code, but I can’t find anything obvious. Could someone point me to the right general approach for a modification like this? Or failing that, to the right parts of the source code to pick apart?

I can’t imagine a use case that would warrant actual participants in a subprocess since the resulting XML wouldn’t be valid BPMN 2.0. Can you describe the problem you’re trying to solve? Maybe that’ll help us figure out the right solution.

I don’t entirely understand it myself, but my employer says that it should be valid in BPMN 2.0 to have collapsed pools in subprocesses (and a representation of the original pool, by extension) so that message flows to/from subprocesses can be represented correctly. (If you need more specific details, I’ll ask him for a clear write-up; I’m strictly in the realm of implementation.)

There are ways to do this using a diagram’s DI but it doesn’t really make sense. Where does the idea come from? Did you use another tool in the past, that allowed this?

1 Like

This is actually no new idea, but the common understanding of all colleagues that I am working with in different OMG task forces. Representing a black box pool within a subprocess diagram makes perfect sense.
Take an expanded (embedded) subprocess. You will agree that the intermediate events and activities contained in this subprocess can exchange messages with a blackbox pool. If we now change the representation of this embedded subprocess to “collapsed”, nothing in the semantics should change as this is just a different visual representation. So it will still be perfectly legal to have message exchanges between the activities contained in the now collapsed subprocess and a blackbox pool of the process. The only difference is that if we want to visualize this message flow, we need to visualize the blackbox pool on the subprocess diagram so that we can use it as the source or target for message flows. This clearly does not make the XML file invalid as nothing changes in the process definition; it only affects the visualization of the diagram’s DI.
This way of representing things is nothing special of any tool in the “past”, but common practice with those modeling tools that allow real embedded subprocesses (many vendors do not distinguish embedded subprocesses and call activities).

Okay so if I understand correctly:

  1. You have a collaboration like this:

brave_QznV2kVelL

  1. You collapse the subprocess:

brave_nViorTdV0Z

  1. You drill down into the collapsed subprocess and expect to see the empty participant visualized:

brave_ccdJPceTGV

This is not supported by bpmn-js. It’s possible but quite a lot of work to build this.

@philippfromme To the best of my knowledge, the BPMN specification does not discuss nested pools. Pools in sub processes are neither allowed nor forbidden. There’s also no example of such models in the spec.

In any case, there are open questions: (1) If nested pools were allowed, what would be the meaning of expanded sub processes containing such pools? (2) If they are forbidden, how do you display message flows within collapsed sub processes?

In his book “BPMN Method and Style”, author Bruce Silver discusses some aspects of this. In his opinion, a sub process can contain one white-box pool (adhering to some rules) and many black-box pools. This is an answer to the second question, because he advocates a modeling style emphasizing collapsed sub processes. He was using a tool called “Process Modeler for Visio” from itp commerce which allowed such models.
However, he also states that “a pool may not contain another pool.”, leaving the first question open.

I work with another modeling tool that softly forbids nested pools. You can model pools in any diagram and even link them. However, you can explicitly state that a linked diagram is an embedded subprocess. In that case, you will get the validation that tells you nested pools are forbidden.

I agree that the BPMN spec is silent on a number of topics and at times requires you to make logical “interpretations”. Regarding the topic in this thread, it is important to clearly differentiate the process definition and its visual representation (DI), which is the diagram.
Pools clearly cannot be contained in another pool as part of the process definition. Some tools mandate that a subprocess diagram contains a pool, just like a process. In this case, as there is only one pool for each process, this subprocess pool must be seen as identical to the pool of the main process - a repetition of the same pool on another diagram. If the pool is not represented on the subprocess diagram … well then the subprocess is still implicitly contained in the pool of the main process, it’s just not visible on the subprocess diagram.
This leads to another question which is often debated, but for which I understand there is a clear consensus among my OMG colleagues: A subprocess diagram may define additional lanes that further subdivide the part of the pool, which is implicitly or explicitly represented on that subprocess diagram. These additional lanes are sub-lanes of the lane in which the subprocess is located in the main process.
In summary, a consequence for blackbox pools represented both in the diagram of a process and the diagram of its subprocess is that a modeling tool should allow you “link” pools if they represent the same pool. Modeling tools like the ViziModeler (former “Process Modeler for Visio”) and the Trisotech Workflow Modeler allow you to connect visual representation in such a way that it is clear that they repesent the same pool.

This is exactly what I would like to do.

I’ve just tried to model this using Trisotech and I’ve noticed I can model just about anything so I can technically model what you’re describing but it’s only because there are no rules at all. :man_shrugging: This is fundamentally different to how our tool works.

There a fundamentally two possible approaches: Either you prevent the user to model what is not allowed (bpmn.io approach) or you validate the model afterwards (like with bpmnlint). Trisotech (like the ViziModeler) mostly does the latter. There are two validation buttons in Trisotech: the “BPMN Validation”, which gives you more flexibility and just validates against the BPMN spec, and the M&S validation, which applies Bruce Silver’s Method & Style rules. See also https://www.trisotech.com/bpmn-style-rules/ for a blog post of Bruce on this topic using the Trisotech modeler.
While the two approaches are fundamentally different, I would argue that it should be possible to take the best from both worlds. For example, as Bruce mentions in his post: “When you add a pool to a child level that has the same name as a previously defined pool in the parent level, the tool will ask if you intend these to represent the same participant.” This is a check done while you are editing and personally, I would be fine not allowing to insert any new blackbox pool at the child level, but being allowed to select only from a list of blackbox pools that have already been defined for the process.

I agree that there is a way of building this in a way that aligns with our design principles. As I mentioned it would be a considerable amount of work.

@kirstenhh To get back to your original question: It is not possible to visualize this at the moment. Once you collapse a subprocess, all message flows connected to child elements will be reconnected to the subprocess.

brave_JIEcVdl1p5

So the first thing you’d have to do is to keep the information about the original message flow source somewhere.

1 Like

@sergeschiltz

Some tools mandate that a subprocess diagram contains a pool, just like a process.

Can you give an example of such a tool? As you said, some vendors do not effectively distinguish between embedded sub processes and call activities. I’m curious about different tool implementations.

… consensus among my OMG colleagues

Do you have actual OMG colleagues? From my layman’s perspective, the OMG doesn’t work on anything BPMN related. I’m kinda curious about some edge cases of BPMN, though. Is there a way to identify “official” consensus on some topics?

Tools: Bizagi for the mandatory pools. And ADONIS uses a call activity approach for subprocesses.

I’m a member of the DMN Revision Task Force, of which many members contributed to the BPMN spec. And I am also a member of the BPM Certification questions task force. We are currently re-orienting OMG’s BPM certification exams to focus exclusively on OMG specs with a clear emphasis on BPMN. This is actually where the question came from recently: We agreed to use bpmn.io for creating the BPMN examples in questions and answers, knowing however that some aspects (such as the pools at a subprocess level) currently cannot be modeled.

Thanks.

We agreed to use bpmn.io for creating the BPMN examples in questions and answers, knowing however that some aspects (such as the pools at a subprocess level) currently cannot be modeled.

Cool :slight_smile:

I’ve contributed a little to both bpmn-js and the token simulation plugin. That’s how I came across some open questions. Hence the question, is there any way to get answers at least semi-officially?

This super interesting! What made you choose bpmn.io?

  1. Symbols conforming to the OMG standard.
  2. Availability (for free) to all task force members
  3. Ease of use
  4. Good SVG export
    But there clearly was a discussion and doubt about this decision because of the lack of blackbox pools in subprocesses and also as lanes cannot be used without being inside a pool. The (few) missing symbols were considered less important as the most common ones are available. But this issue might resurface once we move up to the Intermediate and Advanced level exam questions.
1 Like

There is a Jira with current change topics and you may send a question to OMG (I’ll try to find the address). These questions are then forwarded to the team and normally one of us writes an answer.

2 Likes

This is another thing that I saw is possible with Trisotech but didn’t make sense to me. Is that a valid concept? What are the semantics of a lane outside of a participant?