Event subprocess - from subprocess to super process

Hi dear Camunders,

I would like to design process where an event subprocess would be able to be trgerred anytime and let say a super process would start again from a certain point. I was thinking about compensations (won’t work from subprocess or call activity to super process) and signal events ( I do need to move within a particular process) but it seems they won’t solve this.

Is there any approach on how to achieve this
Thank you for any suggestion

1 Like

Hi, maybe this might be an approach.

Greetings,
Ingo

2 Likes

From sub process there’s intermediate message catch event which directs the task to Step “A”, is that like rerouting back to specific step?

What if the subprocess is a Multi-instance and if particular message event was caught at subprocess “C” and wanted to route back to Step “A”, after completion of Step “A” again new instance will be started?

If yes, then what happened to that process instance which was started before the message was caught?

Hi, not sure if I understand your question correctly.
Multi instance sub process (B+C) would create problems I guess as you would end up in a new token at A for every (multi) instance that you catch in (B+C). This would probably give a multiplier effect. Not sure if that was part of the initial problem though.

Consider the below img, the subprocess creates 2 instance based on Step A inputs(collection [test1,test2]), now message start event starts the process instance and token reached the subprocess. Now subprocess starts two process instances and one of the instances at Step B has thrown an event and it was routed back to step A. Now again it will reach subprocess and starts two instances. Now total process instances are 4(2+2 in each execution).

I think your interpretation of how an interrupting boundary event works on a multi-instance activity is incorrect. Such an event will cancel all instances of the multi-instance activity, since it is defined on the scope of that activity, not that of the individual activities within the subprocess in this case. That would mean, in your example, you would end up with 2 new executions of the subprocess, no more. There’s information in the docs:
https://docs.camunda.org/manual/7.9/reference/bpmn20/tasks/task-markers/#boundary-events-and-multi-instance

2 Likes

thank you guys for the suggestions!
So far the process doesn’t need multi instance solution, so I did rething the process and at the end, I have decided for the following solution (simplified) :

this was good insight, thx!