I was just using the bundled web application to run my process, so I have no 
unit test.  Here are my processes.
Process that contains the sub-process:

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="urn:jbpm.org:jpdl-3.1"  name="super">
  |    <swimlane name="User">
  |       <assignment expression="user(bert)"></assignment>
  |    </swimlane>
  |    <super-state name="GetName">
  |        <task-node name="GetFirstName">
  |           <task name="task1" swimlane="User">
  |              <controller>
  |                 <variable name="FirstName"></variable>
  |              </controller>
  |           </task>
  |           <transition name="" to="GetlastName"></transition>
  |        </task-node>
  |        <task-node name="GetlastName">
  |           <task name="task1" swimlane="User">
  |              <controller>
  |                 <variable name="LastName"></variable>
  |              </controller>
  |           </task>
  |        </task-node>
  |       <transition name="" to="David"></transition>
  |    </super-state>
  |    <start-state name="start">
  |       <task name="GetStarted" swimlane="User">
  |          <controller>
  |             <variable name="Pet"></variable>
  |          </controller>
  |       </task>
  |       <transition name="" to="GetName"></transition>
  |    </start-state>
  |    <end-state name="end1"></end-state>
  |    <process-state name="David">
  |             <sub-process name="david" />
  |             <variable name="FirstName" />
  |             <variable name="LastName" />
  |       <transition name="" to="end1"></transition>
  |    </process-state>
  | </process-definition>
  | 

The sub-process.

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="urn:jbpm.org:jpdl-3.1"  name="david">
  |    <swimlane name="Son">
  |       <assignment expression="user(bert)"></assignment>
  |    </swimlane>
  |    <swimlane name="Father">
  |       <assignment expression="user(ernie)"></assignment>
  |    </swimlane>
  |    <start-state name="start">
  |       <task name="StartTask" swimlane="Father">
  |          <controller>
  |             <variable name="FirstName"></variable>
  |             <variable name="LastName"></variable>
  |             <variable name="FirstNumber"></variable>
  |             <variable name="SecondNumber"></variable>
  |          </controller>
  |       </task>
  |       <transition name="DoMath" to="AreYouRich">
  |          <action name="SayHello" 
class="com.sample.action.WelcomeMessageActionHandler">
  |             <message>Welcome to my process ${firstName} 
${lastName}!</message>
  |          </action>
  |       </transition>
  |    </start-state>
  |    <end-state name="end">
  |       <event type="node-enter">
  |          <action name="PeaceOut" 
class="com.sample.action.MessageActionHandler">
  |             <message>Peace out!</message>
  |          </action>
  |       </event>
  |    </end-state>
  |    <decision name="AreYouRich">
  |       <event type="node-enter">
  |          <action name="CalculateWealth" 
class="com.sample.action.MathActionHandler"></action>
  |       </event>
  |       <transition name="No" to="end">
  |             <condition expression="#{contextInstance.variables.sum le 100}" 
/>
  |          <action name="ForgetYou" 
class="com.sample.action.MessageActionHandler">
  |             <message>Forget you then, you loser.</message>
  |          </action>
  |       </transition>
  |       <transition name="Yes" to="AskForMoney">
  |             <condition expression="#{contextInstance.variables.sum gt 100}" 
/>
  |       </transition>
  |    </decision>
  |    <task-node name="AskForMoney">
  |       <task name="GetMoney" swimlane="Son">
  |          <controller>
  |             <variable name="HowMuchMoney"></variable>
  |          </controller>
  |       </task>
  |       <transition name="Thanks" to="end">
  |          <action name="Thanks" 
class="com.sample.action.MessageActionHandler">
  |             <message>Thanks for the dough pops.</message>
  |          </action>
  |       </transition>
  |    </task-node>
  | </process-definition>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936365#3936365

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936365


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to