I am using a parallel gateway to start all sub-processes at the same time and only complete the parent process when they are all done.
My requirements are that I need to be able to stop and restart one subprocess.
Stopping a process instance shouldn’t block the parent process from continuing.
It should be possible to restart a sub process without restarting the parent process.
Only after the sub-process has started do I know whether it isn’t necessary anymore.
At the moment, if we delete a process instance, the token will be lost and the parent process stuck.
An alternative could be to implement a boundary even on the sub-process level.
But I don’t know how I could restart the sub process within the same parent.
Thank you for your thoughts on how to handle this problem!
I am wondering if the real relationship between these processes are indeed Parent/sub-processes given the described level of independece between their life-cycles.
Hi @victorhugof,
this is a good point. The main reason why I need to group those processes is that they need to start with the same Message start Event and I noticed that it’s not possible to have multiple processes with the same message start event.
Thank you @hassang for your reply and examples!
I tried this solution but my problem is to start the sub-process within the parent process again.
Parent process starts
One sub process is interrupted by a boundary event.
I want to start this sub process again and use POST /process-definition/key/{key}/start
The sub process is started without the previous Super Process Instance ID, the process is running as a standalone and I lose the relation to the parent.
Okay… if you need to keep the relation to the main process then you can implement restart operation as non-interrupting event sub-process (according to your posted process, you need to have three event sub-processes each with a unique start message) or you can have a single event sub-process in which bpmn element to be called is defined as expression.
Kindly find attached an example main process with non-interrupting event sub-process to restart sub-processes dynamically. call-multiple-processes.bpmn (10.0 KB)
You can restart sub-process “test-sub-process-a” as follow