The jBPM User's Guide states the following:
anonymous wrote : The nodetype node expects one subelement action. The action 
is executed when the execution arrives in the node. The code you write in the 
actionhandler can do anything you want but it is also responsible for 
propagating the execution. 
I have a trasition (moreInfoLevel_1) to a Node (notifyMoreInfo) and then an 
action tied to the on-enter event (NotifyMoreInfo). I am not manually 
propagating the execution, but the token ends up in the next node (the end 
state). Here is my process definition. 


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition  xmlns="urn:jbpm.org:jpdl-3.1"  name="dssdar.process">
  |   <start-state name='createRequest'>
  |       <transition name="propLevel_1" to="review1task">
  |          <action name="notifySupervisor" 
class="com.lmco.dssdar.action.handler.NotifyReviewer">
  |             <message>notifySupervisor</message>
  |          </action>
  |       </transition>
  |   </start-state>
  |   <end-state name='end' />
  |    <node name="notifyreject">
  |       <event type="node-enter">
  |          <action name="notifyRejectAction" 
class="com.lmco.dssdar.action.handler.NotifyReject">
  |             <message>notifyRejectAction</message>
  |          </action>
  |       </event>
  |       <transition name="" to="end"></transition>
  |    </node>
  |    <node name="notifyapprove">
  |       <event type="node-enter">
  |          <action name="notifyApproveAction" 
class="com.lmco.dssdar.action.handler.NotifyApprove">
  |             <message>notifyApproveAction</message>
  |          </action>
  |       </event>
  |       <transition name="" to="end"></transition>
  |    </node>
  |    <task-node name="review1task">
  |       <task name="supervisorReview">
  |          <assignment class="com.lmco.dssdar.action.handler.AssignTask">
  |             <actorID>SUPERVISOR</actorID>
  |          </assignment>
  |       </task>
  |       <transition name="rejectLevel_1" to="notifyreject"></transition>
  |       <transition name="propLevel_2" to="review2task">
  |          <action name="notifyIAO" 
class="com.lmco.dssdar.action.handler.NotifyReviewer">
  |             <message>IAO</message>
  |          </action>
  |       </transition>
  |       <transition name="moreInfoLevel_1" to="notifymoreinfo"></transition>
  |    </task-node>
  |    <task-node name="review2task">
  |       <task name="iaoReview">
  |          <assignment class="com.lmco.dssdar.action.handler.AssignTask">
  |             <actorID>IAO</actorID>
  |          </assignment>
  |       </task>
  |       <transition name="approve" to="notifyapprove"></transition>
  |       <transition name="rejectLevel_2" to="notifyreject"></transition>
  |       <transition name="moreInfoLevel_2" to="notifymoreinfo"></transition>
  |    </task-node>
  |    <node name="notifymoreinfo">
  |       <event type="node-enter">
  |          <action name="notifyMoreInfoAction" 
class="com.lmco.dssdar.action.handler.NotifyMoreInfo">
  |             <message>notifyMoreInfoAction</message>
  |          </action>
  |       </event>
  |       <transition name="" to="end"></transition>
  |    </node>
  | </process-definition>
  | 

Here is my execute method of the NotifyMoreInfo action handler.

  | 
  | public void execute(ExecutionContext context) throws Exception {
  |    context.getContextInstance().setVariable("message", message);
  |    System.out.println("NotyifyReviewer==> " + message );
  | }
  | 
  | 

The string is printed as expected, but the transition to the next state is also 
executed. Can anyone fill me in to what is happening. I expect it to remain in 
this state until I manually signal the token. Is this not correct?

Is this possibly happening due to the fact there is only a single leaving 
transition?

TIA. Randy

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008470
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to