Type: Bug Report
Priority: L3 - Default
Affects Version/s: 7.9.0, 7.9.5
Fix Version/s: None
Create a process model that contains an event-based gateway in which the triggered event modifies a process variable via a script on its Output tab in the model.
- BPMN file contains a manual task in which an process variable is successfully initialized as a script-type output variable. This demonstrates that scripts on output variables do work in some circumstances.
- BPMN file contains an event-based gateway with both message and timer intermediate catch events
- The catch events are configured with a script-type output parameter with the same variable name as created above
- BPMN file invokes an Intermediate Message Throw after a delay timer to trigger the event gateway
- As an alternative, the message delay timer can be increased so that the event gateway is triggered by its own "escape hatch" timer event
- Script steps are invoked to print out the process variable values before and after the event gateway is triggered
All script-type output variables perform their operations to create or modify a process instance variable regardless of their location in the process flow.
Only the initial value is assigned to the variable in the output of the manual task. Neither the message receive event nor the timer event following the event-based gateway modify or update the value of the process variable. The log steps report unchanged values, and inspection of history in cockpit show no changes to the variable value.
Modify the engine so that the script-type Output variables set or modify the process instance variable values properly when configured on events associated with an event-based gateway.
Steps to Reproduce
- Deploy the attached event_gateway_output_script_failure.bpmn file to a process engine instance via the REST API.
- Use Tasklist to start the Event Gateway Output Script Failure process
- Monitor the stdout or relevant logfile for log statements produced by System.out.println calls in the two "log" steps
- Note that the "Initial" value of the "TestVariable" process variable instance is set by the script in the Output tab of the Manual Task
- Note that the "Final" value of the "TestVariable" process variable instance remains unmodified by the Output tab of the triggered Message Catch event.
- Optional: Modify the timer durations so that the Message Delay timer value exceeds the value of the "Escape Hatch" event. Observe that the timer event does not modify the value of the process variable.
- Optional: Observe the history of the process variable named "TestVariable" in Cockpit and observe that only the initial value is set and never modified.