Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
jBPM 3.0.1
-
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>