AnsweredAssumed Answered

Synchronous calling and waiting for finished usertasks

Question asked by werners on May 14, 2014
Latest reply on May 15, 2014 by werners
Hi all,
goal is to add a dynamic  approval steps to a static process definition which is deployed to the repository.
Process “global”
Start –> servicetask1 –> servicetask2 –> end
Process “approval”
Start -> servicetask3 –> usertas 4 -> end

Servicetask1 is implemented with java class.

Depending on the content, servicetask1 should call/start synchronous one dynamic chosen approval-process  with  “runtime.startProcessInstancebyKey”(“approval”) .
Only when the approval process is completely finished  (including the manual usertask) the process should continue on next line in the javaclass from servicetask1 to use the results from approval process.

For sure, the servicetask2 should only get started when the servicetask1 with javacode inside was done completely.
Now, it seems that servicetask1 starts the approval-process. But when usertask 4 is reached, the process global continues with servicetask2, while usertask 4 is still untouched.

Can someone give me some advice how I can implement the desired behavior?