Ah ha! I restructured the process definition so that the task and timer 
converge at an intermediate node and then proceed to the join:


  | <?xml version="1.0" encoding="UTF-8"?>
  | <process-definition xmlns:jpdl="http://jbpm.org/3/jpdl"; 
  | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
  | xsi:schemaLocation="http://jbpm.org/3/jpdl 
http://jbpm.org/xsd/jpdl-3.1.xsd"; name="TestFork">
  | 
  |    <start-state name="Start">
  |       <transition name="StartTransition" to="InitializeVariables" />
  |    </start-state>
  | 
  |    <node name="InitializeVariables">
  |       <action class="com.olf.workflowmgr.action.VariableInitActionHandler">
  |          <VarList>
  |             <el>Proceed|Boolean|False|</el>
  | 
  |             <el>Flag|CustomList|One|One,Two,Three</el>
  | 
  |             <el>ReturnStatus|PickList||BPM_RETURN_CODE_TABLE</el>
  |          </VarList>
  |       </action>
  | 
  |       <transition name="StartProcess" to="Fork" />
  |    </node>
  | 
  |    <end-state name="Done" />
  | 
  |    <fork name="Fork">
  |       <transition name="T1_1_Task" to="Task" />
  | 
  |       <transition name="T1_2_Var" to="Var" />
  |    </fork>
  | 
  |    <node name="Var">
  |       <action 
class="com.olf.workflowmgr.action.VariableUpdateActionHandler">
  |          <VarList>
  |             <el>Flag|Two</el>
  |          </VarList>
  |       </action>
  | 
  |       <transition name="T2_1_Join" to="Join" />
  |    </node>
  | 
  |    <task-node name="Task">
  |       <task name="Task_3" blocking="true" duedate="1 minute">
  |          <assignment 
class="com.olf.workflowmgr.action.TaskAssignmentHandler">
  |             <assignee>trader1</assignee>
  |          </assignment>
  | 
  |          <controller>
  |             <variable name="Flag" access="read" />
  | 
  |             <variable name="Proceed" access="read,write,required" />
  |          </controller>
  |       </task>
  | 
  |       <transition name="T3_3_WWW" to="WWW" />
  | 
  |       <transition name="Task_Expire_Expired" to="Expired" />
  | 
  |       <timer name="Task_Expire" duedate="1 minute" 
transition="Task_Expire_Expired" />
  |    </task-node>
  | 
  |    <node name="Expired">
  |       <action 
class="com.olf.workflowmgr.action.VariableUpdateActionHandler">
  |          <VarList>
  |             <el>Flag|Three</el>
  |          </VarList>
  |       </action>
  | 
  |       <transition name="T4_1_WWW" to="WWW" />
  |    </node>
  | 
  |    <state name="WWW">
  |       <timer name="WWW_Expire" duedate="1 minute" 
transition="WWW_Expire_Join" />
  | 
  |       <transition name="T5_5_Join" to="Join" />
  | 
  |       <transition name="WWW_Expire_Join" to="Join" />
  |    </state>
  | 
  |    <join name="Join">
  |       <transition name="T6_1_Mail" to="Mail" />
  |    </join>
  | 
  |    <node name="Mail">
  |       <action class="com.olf.workflowmgr.action.EmailActionHandler">
  |          <From>trader1</From>
  | 
  |          <To>trader1</To>
  | 
  |          <Subject>Fork completed</Subject>
  | 
  |          <Body>Flag value is $Flag;</Body>
  |       </action>
  | 
  |       <transition name="T7_1_AlmostDone" to="AlmostDone" />
  |    </node>
  | 
  |    <state name="AlmostDone">
  |       <transition name="T8_8_Done" to="Done" />
  |    </state>
  | </process-definition>
  | 

In my "running BPM viewer" I now see the expected results ... the process hits 
the fork. A child token goes to Var, and then to Join. The other child token 
goes to Task, to Expired, to WWW, and finally to Join as each timer expires. 
The parent token then proceeds to Mail and then AlmostDone. However, the two 
child tokens remain at the Join node, and are not "ended"  (token.hasEnded() 
returns false). 

Is that the correct behavior? I expected the child tokens to end when they both 
hit the join node.

Thanx.


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

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


-------------------------------------------------------
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