Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-376

Scripts on a node do not get to write their variables before node.leave() causes other nodes to be executed.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • jBPM 3.0.1
    • Runtime Engine
    • None

    Description

      A script on a node requires a node.leave in order to continue execution past the node. This means that the write back of the variables to the ExecutionContext does not happen until after the following nodes have been executed.

      A workaround is to set the variables yourself, by using executionContext.setVariable before calling node.leave.

      In the following example, it looks like the variable v will be available for use in the followin nodes, but the assignment doesn't happen until after those following nodes are executed (or until the process reaches a wait state).

      <node name="x">
      <script>
      <variable name='v' access='write'/>
      <expression>
      <![CDATA[
      v = true;
      node.leave(executionContext);
      ]]>
      </expression>
      </script>
      <transition to="y"/>
      </node>

      Attachments

        Activity

          People

            Unassigned Unassigned
            colinws_jira Colin Wilson-Salt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: