Starting a BPMN process within another BPMN process

Scenario 1 - Starting process B separately and auto completion of user task works as expected.

Scenario 2 - Starting process B within process A and auto completion of user task is not working.

In scenario 1 , the user task is loaded into ACT_RU_TASK table as soon as its started and we are able to retrieve it & close it. Whereas in scenario 2 , the user task is not loaded into the table until the control comes back to process A.

We are starting process B within process A using runtime service - startProcessInstanceByKey method.

Do we need to follow any other approach for starting a bpmn from another bpmn ? Please suggest .

Hey @jothianand,

What do you mean by auto completion of user task?

There are 2 approaches that you can use to start a process from another process:

  • Using the Java API - this will start a process that is independent of the current process
  • Using a Call activity - this will start a process and wait for the process to complete before going onto the next step

Cheers,
Filip

Thanks, will try Call Activity approach.

On a different note, I have a JavaDelegate and i need to add junit test case for the same. Do we have any samples ? If yes, please share .