Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9544

Output variables of type "script" are not processed following event-based gateway



    • Type: Bug Report
    • Status: Open
    • Priority: L3 - Default
    • Resolution: Unresolved
    • Affects Version/s: 7.9.0, 7.9.5
    • Fix Version/s: None
    • Component/s: engine
    • Labels:
    • Environment:
      Reproduced using both JavaScript and Groovy as the script language


      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

      Expected Outcome
      All script-type output variables perform their operations to create or modify a process instance variable regardless of their location in the process flow.

      Actual Outcome
      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.

      Desired Fix
      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

      1. Deploy the attached event_gateway_output_script_failure.bpmn file to a process engine instance via the REST API.
      2. Use Tasklist to start the Event Gateway Output Script Failure process
      3. Monitor the stdout or relevant logfile for log statements produced by System.out.println calls in the two "log" steps
      4. Note that the "Initial" value of the "TestVariable" process variable instance is set by the script in the Output tab of the Manual Task
      5. Note that the "Final" value of the "TestVariable" process variable instance remains unmodified by the Output tab of the triggered Message Catch event.
      6. 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.
      7. Optional: Observe the history of the process variable named "TestVariable" in Cockpit and observe that only the initial value is set and never modified.


      • This behavior has been confirmed for both Javascript and Groovy script types on Output variables




            dhallmark Daniel Hallmark
            0 Vote for this issue
            1 Start watching this issue