Here is a more complete example:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="urn:jbpm.org:jpdl-3.1
urn:jbpm.org/xsd/jpdl-3.1.xsd"
| name="test">
| <start-state name="start">
| <transition name="" to="state1"></transition>
| </start-state>
| <state name="state1">
| <event type="node-leave">
| <script>
| <variable name="aName" mapped-name="mappedName"/>
| <expression>
| executionContext.setVariable("mappedName",
7);
| </expression>
| </script>
| </event>
| <transition name="" to="decision1"></transition>
| </state>
| <decision name="decision1">
| <transition name="" to="task1">
| <condition expression="#{contextInstance.variables.mappedName le 5}"/>
| </transition>
| <transition name="tr2" to="task2">
| <condition expression="#{contextInstance.variables.mappedName ge 5}"/>
| </transition>
| </decision>
| <task-node name="task1">
| <transition name="" to="end1"></transition>
| </task-node>
| <task-node name="task2">
| <transition name="" to="end1"></transition>
| </task-node>
| <end-state name="end1"></end-state>
| </process-definition>
|
You can replace the first state part and the decision part with:
| <state name="state1">
| <event type="node-leave">
| <script>
| <variable name="aName" mapped-name="mappedName"/>
| <expression>
| executionContext.setVariable("mappedName",
"tr1");
| </expression>
| </script>
| </event>
| <transition name="tr1" to="decision1"/>
| </state>
| <decision name="decision1">
| <handler expression="#{contextInstance.variables['mappedName']}"/>
| <transition name="tr1" to="task1"/>
| <transition name="tr2" to="task2"/>
| </decision>
|
I hope this introduces some more clearness!
Regards,
Saviola
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3942304#3942304
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3942304
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user