AnsweredAssumed Answered

Multi sub process creation by script

Question asked by mwm1 on Jun 19, 2015
Latest reply on Jun 22, 2015 by mwm1
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

Outcomes