Subprocess modeling, double gateway issue, escalation event

Hi,

I am puzzled with BPMN subprocess used for decision making. I would like to use subprocess which has GW at the end and two end events. The issue I have is how to model it correctly on main process level. I attach two versions. Ver 1 has gateway duplicated also on main process level. I think it is wrong from notation point of view, but it would be more readable for non BPMN people specially when subprocess is collapsed. Ver 2 I used escalation event (or error event could be used as well). It seems correct from notation point of view, but not so easy to understand by management etc who would like to understand the process. Which one you suggest me to use or is there any Ver 3 as alternative? (My real process is much more complicated and has multiple such subprocesses)


Both diagrams are correct :slight_smile:
The duplication of the gateway is actually a good practice that makes it easier to follow the correct flow when reading the diagram (especially if the subprocess would be a separate diagram).
I’d use Ver1, because it is easier to read. However, an escalation might make more sense in your complex diagrams.

Although you said these are simplified diagrams, I’d like to give some hints:

  • If the subprocesses are as simple as depicted here, I’d simply replace them with a single task “Make approval decision”.
  • The terminate event is useless in both versions, so you could turn it into a regular end event to make them even easier to read.

Thank you for feedback and giving me confidence to use ver1 where it seems make more sense (when no real escalation or error need). My hesitation came from Camunda token simulation as there you kind of have option to switch those GW-s into different positions which gives wrong output.

I see, like “Approved? No” inside the sub process and “Approved: Yes” outside the subprocess.

The token simulator is a BPMN-compliant engine, but it does have some limitations. In this case, the lack of data support allows such contradicting flows that would not happen in Camunda 7 or 8, where both gateways could use the same variable.

There is nothing wrong in the duplicated gateway in terms of notation. When working with sub-process I like to not focus on what is happening inside and treat it as a black box with inputs and outputs. This way you allow the sub-process to move forward with its own implementation without impacting the callers(as long the input/output contract is maintained).
As mentioned the Token simulator is good to do a rough validation but its lack of data imposes some limitations. That’s why I like to play with the Camunda Run, that is a standalone engine version that I can run on my laptop.
Then I can use process variables, actual errors and escalations, etc. and it levels up the validation capabilities to close to real world (apart performance, I think).

Got similar processes into it, added some logic to control which End element would be used and what would be sent as response.

Caller_Process.bpmn (4.9 KB)
The_Sub_Process.bpmn (4.9 KB)

PS: Sorry it was supposed to be a reply to the original post :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.