[jboss-user] [JBoss jBPM] - Re: before-signal and node-enter action question

obrand do-not-reply at jboss.com
Wed Aug 30 19:36:16 EDT 2006


"obrand" wrote : New to jBPM and canoot understand within a simple test what is the difference between the before-signal and the node-enter as both reacts the same way.
  | Actually the after-signal is doing the same that before-signal as well.
  | 
  | The code snippet for the process is:
  | 
  | <state name="auction">
  |   |       <event type="before-signal">
  |   |          <action name="devInfo" class="com.fota.action.DevInfoActionHandler"></action>
  |   |       </event>
  |   |       <event type="node-enter">
  |   |          <action name="devInfo2" class="com.fota.action.DevInfoActionHandler2"></action>
  |   |       </event>
  |   |       <event type="after-signal">
  |   |          <action name="devInfo3" class="com.fota.action.DevInfoActionHandler3"></action>
  |   |       </event>
  |   |       <transition name="to_end" to="end"></transition>
  |   |    </state>
  | And the Test is:
  | 
  | ProcessInstance process = new ProcessInstance(definition);
  |   | 			
  |   | 			assertEquals("Process in start mode", process.getRootToken().getNode().getName(), "start");
  |   | 			
  |   | 			
  |   | 			process.signal();
  |   | 			logger.info((String)process.getContextInstance().getVariable("devInfo2"));
  |   | 			assertEquals("Process in auction mode", process.getRootToken().getNode().getName(), "auction");
  |   | 			
  |   | 			logger.info((String)process.getContextInstance().getVariable("devInfo"));
  |   | 			process.signal();
  |   | 			logger.info((String)process.getContextInstance().getVariable("devInfo3"));
  | 
  | 
  | devInfo is null on this test whereas placed after the next signal(), it prints the right content.
  | 
  | Could someone explains me the execution model associated with the action types?
  | 
  | Thanks
  | 
  | Olivier

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

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



More information about the jboss-user mailing list