[
http://jira.jboss.com/jira/browse/JBPM-376?page=comments#action_12412802 ]
Ronald van Kuijk commented on JBPM-376:
---------------------------------------
can someone say if this is still an issue with jbpm 3.1 or 3.2 and if so if we want to
support a construction like this
Scripts on a node do not get to write their variables before
node.leave() causes other nodes to be executed.
------------------------------------------------------------------------------------------------------------
Key: JBPM-376
URL:
http://jira.jboss.com/jira/browse/JBPM-376
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.0.1
Reporter: Colin Wilson-Salt
Assigned To: Tom Baeyens
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>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira