Package org.apache.shale.dialog.basic.model

Examples of org.apache.shale.dialog.basic.model.Transition


        State current = position.getState();
        String fromStateId = current.getName();

        // Select the next state based on the specified outcome
        Transition transition = current.findTransition(outcome);
        if (transition == null) {
            transition = position.getDialog().findTransition(outcome);
        }
        if (transition == null) {
            throw new IllegalStateException
              ("Cannot find transition '" + outcome
               + "' for state '" + fromStateId
               + "' of dialog '" + position.getDialog().getName() + "'");
        }
        State next = position.getDialog().findState(transition.getTarget());
        if (next == null) {
            throw new IllegalStateException
              ("Cannot find state '" + transition.getTarget()
               + "' for dialog '" + position.getDialog().getName() + "'");
        }
        String toStateId = next.getName();
        position.setState(next);
View Full Code Here

TOP

Related Classes of org.apache.shale.dialog.basic.model.Transition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.