"some sort of" decision handler.

I mean that, when you do a signal without a transition name, it will do a 
getDefaultLeavingTransition on the node (check the sourcecode for this). It 
would be nice if this function also calls a handler, similar to a 
DecisionHandler, which returns the name of the transition that should be 
consequently used in the signal.


  | In token:
  |   public void signal() {
  |     if ( (node == null) || (node.getDefaultLeavingTransition() == null)) {
  |       throw new IllegalStateException("couldn't signal token '" + this + "' 
: couldn't leave node '" + node + "' over its default transition");
  |     }
  |     signal(node.getDefaultLeavingTransition());
  |   }
  | 
  | In node:
  | 
  |   public Transition getDefaultLeavingTransition() {
  |     Transition defaultTransition = null;
  |     if ( (leavingTransitions!=null)
  |          && (leavingTransitions.size()>0) ) {
  | // here you could check for the existence of a handler, and use this 
  | // if it returns null, you could still use the rest of the code, giving 
back the first one
  |       defaultTransition = (Transition) leavingTransitions.get(0);
  |     } else if ( superState!=null ){
  |       defaultTransition = superState.getDefaultLeavingTransition();
  |     }
  |     return defaultTransition;
  |   }
  | 
  | ....
  | 
  | 
  | 
  | 



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

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


-------------------------------------------------------
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