Details
-
Bug Report
-
Resolution: None
-
L3 - Default
-
None
-
7.13.11
-
None
Description
Environment:
Camunda Community Edition, Apache Tomcat, Windows and Linux
Description:
An Execution Start Listener on a UserTask will not always set Variables as expected, when using ${execution.SetVariablesLocal()}. If the UserTask has a conditional boundary event, the Variable will be set on the local execution as expected. If the UserTask does not have a boundary event, the variable will be set in the parent Execution Scope.
Steps to reproduce:
Create a new BPMN Model with a single UserTask. Set up an Execution-Listener on the UserTask with event=start and expression = ${execution.SetVariablesLocal('test', null)}
Deploy and start the BPMN Process. Examine the Process Variables.
After this create a conditional boundary-event with the expression ${test != null} on the UserTask, deploy and Start the Process again.
Observed Behavior:
The variable will be in Process Instance Scope with a plain UserTask and in local Execution Scope if a conditional boundary event is present.
Expected behavior:
The variable should always be in the local scope of the UserTask Execution, consistently and not vary depending on the presence of a boundary event.
Root Cause:
Most likely the execution which is passed to Execution Start listener.
Solution Ideas:
Create an Execution on the UserTask always, even if no boundary event is present and pass this execution to the executionListener.