I’ve been working on a series of POCs to prove out the viability of Camunda for an upcoming project, and I’ve run into a problem / question regarding how process variables are passed between a call activity and a boundary event. Below I’ve created a simplified example of the flow that is causing me this issue.
This is the parent process:
Here, a process instance invokes a call activity. That call activity has an interrupting timer boundary event attached to it. When the timer triggers, my expectation is that it should redirect the process instance to the new path and through my helper service that simply logs the process variables. The call activity here is configured such that the “Out Mapping” for variables is set to “all”, with “local” unchecked.
This is the process invoked by the call activity:
Here is where things get interesting. The purpose of this process, by flow chart element here, is:
Create a new execution variable “smsSendCount” with the script element and increment it.
Contact a 3rd party API to send a text.
Wait until a text response is received.
The relevant bit here is the first step, in which smsSendCount is created and / or incremented. My expectation, based on what I’ve seen in the documentation so far, is that if the timer boundary event in the parent process is triggered after the “Increment SMS Count” step has been completed, that the new “smsSendCount” variable will be passed to the “Log Vars” step in the parent process. However, in practice that variable is not present.
So my question is this: does a call activity only pass newly created variables back to the parent process if the call activity has completed? Is this behavior actually expected, or should all execution variables, even new ones, be passed to the interrupting boundary event?