Leave event sub-process and continue in parent process

Is there any way to leave an event sub-process.and continue execution in the parent process? I can’t use a normal sequence flow or link event because neither can cross the boundary of the event sub-process. I can’t use any other intermediate catching event, because the sub-process starts with an interrupting event. I also can’t use an escalation event because the event sub-process must be within the “root” process, not an embedded sub-process that I could attach a escalation boundary event to.

So, the event sup process is being triggered by an interrupting message event - does it have to be interrupting? If so, It means you’ve lost focus on the originial scope, so there’s not many ways to go back.

One idea would be to create a new start event that going to start a new instance with the same data from a new place. You can do that with message events.

2 Likes

Thank you @Niall !
It has to be interrupting, yes. I could probably make it work with a non-interrupting event and suspend the current execution right away but that would not be intuitive at all. I have considered using a start event, but as you mentioned, that would instantiate a new process instance which is not optimal, as I would like to continue the existing instance with its current state. Also, althought this technically possible in camunda, doesn’t this violate the rule that messages must cross participant/pool boundaries?

This doesn’t violate the message restriction because even though it looks like the message event is leaving and entering the same process - they are two different instances so it’s still one process instance sending a message to a differnt process instance which doesn’t violate the requirement.

Can you give me some more details about the process and in perticular the how and why the interrupting messag comes in to the process. It might also be possible to use an embedded sub process with a boundary event instead of an event sub process. that should give you more options.

2 Likes

Thank you for the explanation on the message restriction!

What I need to replicate is basically an interrupt mechanism that is triggered by an important message that requires immediate attention before returning to any other work. This interrupt can be triggered at any time, including multiple times, and must not prevent the termination of the process (i.e., by actively waiting for the message). After the interrupt has been handled, we either want to continue where we left off before the interrupt (this has been discussed before: Resume interrupted process - #10 by WilliamR.Alves and by yourself: Come back from eventSubprocess to the main process - #11 by Niall) or at a specific task (as depicted above), depending on how the interrupt is handled inside the sub-process.