[jboss-user] [JBoss jBPM] - Superstate-enter event not fired

jeanbobby do-not-reply at jboss.com
Tue Jun 5 06:07:05 EDT 2007


Hi,

This is my first usage of super states, as phases in a process.

here's an extact:


<start-state name="start">
  |         <transition to="buildPhase"/>
  | </start-state>
  | 
  | <super-state name="buildPhase">
  |         
  |    <event type="superstate-enter">
  |       <action class="com..." />
  |    </event>
  | 
  | ...
  | 
  |    <state name="waitForValidation">
  |       <transition to="../deliveryPhase"/>
  |    </state>
  | 
  |    <event type="superstate-leave">
  |       <action class="com..." />
  |    </event>

  
The super state leave event is fired, but enter is not.

>From what I read I cant say the doc is precise about this specific behaviour.
Looking at the code this seems 'normal' :

- Transition.take:

if ( destination.getSuperState()!=null ) {
  |     ... fire the event ... 

- SuperState.execute :

Node startNode = (Node) nodes.get(0);
  |     startNode.enter(executionContext);

Going from a node to a super-state taking an explicit transition wont cause the event to be fired as dest.getSuperState == null.

Then the super state will be executed and the first node will be entered without any kind of 'transient' transition being taken.

What do you guys think about that ?

AFAIAC I would expect the super-enter event being fired whatever the enter context (thru an innder node, or referencing the super-state itself).

Thanks for your input.

Best regards

Olivier

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

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



More information about the jboss-user mailing list