I have a process, that calls another (child) process using the call activity element.
The call activity element is configured with a DelegateVariableMapping
class to extract some data out of the child process.
Inside a child process I have a service task element with an end
event listener on it.
When I try to finish the task, the event listener throws an exception - this is expected, my custom data validation fails. What is not expected is that DelegateVariableMapping::mapOutputVariables
gets called. The documentation Delegation Code | docs.camunda.org states:
The
mapOutputVariables
method is called after the call activity was executed, to map the output variables.
As per my understanding, the call activity is still executing, it’s not finished - I can even try to finish its service task again, but again this leads to the DelegateVariableMapping::mapOutputVariables
being called.
The questions are:
- Is this expected? What am I missing in my understanding of
DelegateVariableMapping
and call activities? - How to differentiate the actual end of the call activity inside the
DelegateVariableMapping::mapOutputVariables
call?