This content has been marked as final.
Show 1 reply
-
1. Re: before-signal and node-enter action question
obrand Aug 30, 2006 7:36 PM (in response to obrand)"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