Hi, I have added a variable to the execution, through a Service task listener, that should be passed to the next process through an Intermediate thrown event. However, the created process variable is never passed.
Why not?
I thought it has something to do with scope, but I do not see why/how.
Details:
===The added variable:
<bpmn:serviceTask id="ServiceTask_0ligfzn" name="Reject Deviation" camunda:expression="${wrapperDelegateService.executeWithReturn('direct:rejectDeviation', execution)}"> <bpmn:extensionElements> <camunda:inputOutput> <camunda:inputParameter name="reason">${deviationApprovalRationale}</camunda:inputParameter> <camunda:inputParameter name="deployedControlId">${deployedControlId}</camunda:inputParameter> <camunda:inputParameter name="evidencesLOD2">${deviationEvidencesLOD2}</camunda:inputParameter> </camunda:inputOutput> <camunda:executionListener expression="${execution.setVariable('deviationAccepted', false)}" event="end"/>
===== And to correlate the message (the intermediate message that is thrown):
${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“Deviation”).setVariables(execution.getVariables()).correlate()}