Hi Brian,

     Yes your code will work fine but I would probably do things differently. 
My personal rule of thumb is "always leave each node via transition". If you 
make a visual graph, there should be a connection for each node, and that 
connection is the transistion. If you just "look up" a node, then there won't 
be that transition, and it will look like a hack. If your project gets bigger, 
you wont be able to see the relationship of each node and it might be difficult 
to maintain. To illustrate, you can also probably define it this way ,I have 
not tested this code, but maybe you can get the idea:

    
  |        <state name="s">
  |            <event type="node-enter">
  |                <script>
  |                      /*validation script that results some_condition*/
  |                      token.signal(  some_condition );
  |                </script>
  |            </event>
  |            <transition name="cond1" to="node1"/>
  |            <transition name="cond2" to="node2"/>
  |            <transition name="cond3" to="node3"/>
  |        </state>  
  | 

    First,  this node should be a wait state. Second, validation code is done 
at node-enter. The validation code returns the name of the next transition. I 
have not program anything in node-leave, there is nothing you can do once it 
leaves a node. Just my 2 cents

Regards,

Elmo



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

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


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to