I wan t to have a automate it and don’t want to redesign my BPMN again and again as I want to redirect the Process 4 with a particular condition to either to process 3 or process 2 or process 1 depending on the condition/message it should go to the process I wish to start.
The effort required to remodel the features you want is FAR less effort than having to programmatically implement the features. It’ll also violate a valuable principle of using BPMN - which is to give clarity to how the process will progress visually.
But if you want to you can use process instance modification api to move a token anywhere you like in runtime.
I want to use the same scenario as described but for a better understanding I’ll present you other image
if one task goes to process 6 and from there I call process 2 then the sequence flow should be followed and task should end
There is another task which goes till process 6 and then it call process 4 after the call the sequence flow should be followed and task should end
@anshkapoor your model is too abstract. what do you mean by process1, process2, etc?
In BPMN terminology process is meant to the whole executable bpmn model. Are you trying to orchestrate multiple workflows through parent workflow?
So here, I’m guessing that various activities with in a single process you mentioned as process 1, process 2, etc instead of specifying/modelling task types like UserTask, ServiceTask, SendTask, Call Activity, etc. if its not the case then you might consider doing it by using call activity for orchestrating from parent workflow.
Suppose if you are referring process 1, process 2 to various bpmn activity types, then your requirement is achievable. Subprocess/event subprocess not required, can be done it with via exclusive gateway(1 path will be selected) or conditional sequence flows(more than 1 path can be selected based on criteria).