cancel
Showing results for 
Search instead for 
Did you mean: 

Multi sub process creation by script

mwm1
Champ in-the-making
Champ in-the-making
Dear all,
I am  facing an issue concerning sub process creation by script:
- I have one process parent which create start 1…n sub process
- parent process should wait until all sub process finish to continue other task

The problem is that all process started in the sub process, they don't have any relation with the parent process who started them.

@Override
   public void execute(DelegateExecution execution) throws Exception {
//According to the priority, I start process
ProcessInstance processInstance = runtimeService
               .startProcessInstanceByKey(P1, variables); // then P2 and P3

}


In the "act_ru_execution" there is no affected "parent_id_" to all sub process.
I can't use call activity or sub process for multiinstance in my case, I have to create process according to their priority.
The only reflexion I had, is to get something to add parent ID while creating all sub process.
Could you please help me to solve this issue?
Thanks
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
see CallActivityBehavior implementation.

Regards
Martin

mwm1
Champ in-the-making
Champ in-the-making
Thank you Martin 😉