I have a use case where a CallActivity global sub process will be called by multiple users in a given workflow. It looks somewhat like this.
The multi-instance serial sub process is called with list of users. (For this demo, I use favorite Camunda users ‘john’ and ‘mary’). And in “Called Process” I have set variable
calledProcessAssigneein Initiator plugin value and then use the variable for the user task with
Now everything works fine when there are no transaction boundaries. The user task in “Called Process” will be first assigned to ‘john’ and then ‘mary’.
Problem is that when I apply “Asynchronous Before” flag on “Call to modular process” CallActivity in Initiator Test process, everything falls apart as value of
calledProcessAssignee is null. I also know the probable reason that due to “Async Before” job executor takes over the execution of the process and therefore there is no formal initiator of the process.
But in ideal situation this should not be the case right? Just because, process was started asynchronously, should not change the fact that some user initiated it.
So my question is, why should value of initiator should be null when some transaction impacts it?
process.bpmn (8.2 KB)
The JavaDelegate source code is extremely simple and irrelevant to the problem therefore I have not reproduced it here. If need be, I can do that.
Thanks and Regards