cancel
Showing results for 
Search instead for 
Did you mean: 

Call activity asynchronously with no wait

njames
Champ in-the-making
Champ in-the-making
Hi guys,
Firstly, I have to apologize for a repeat posting. I know I've seen the answer to this question on the forum before, but I have had no success finding it again.
My question is about calling an activity which contains a receive task and timer boundary event, with the calling process then going directly to the next task without waiting for completion of the called activity.
I have some vague memory of it relating to the calling process needing to wait for the output parameters to be returned by the called activity, but, in my case the called activity doesn't have any output parameters.
I have tried having the "call activity" node have async=true and exclusive=false, combined with the receive task in the called activity having async=true and exclusive=false. I expected the called activity to be asynchronous, and the calling process to finish before the called activity, but it doesn't.
Anyone out there have any ideas? Otherwise I will have to admit defeat and make a Java service task to create the process via the runtimeService.startProcessInstanceByKey(). (I prefer the "self-documenting" nature of the "call activity" node in the parent process compared to a "vanilla" service task).

Thanks,

Nick.
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi Nick,

A call activity is used to start a child process that has to be completed before the main process will continue. When you make the call activity async, it only means that the current transaction is ended and the call activity will be executed by the job executor. When you want to start another process asynchronously then you should use a service task like you explained.

Best regards,