Package org.springframework.webflow.engine

Examples of org.springframework.webflow.engine.TransitionableState


  TransitionableState state;

  protected void setUp() {
    flow = new Flow("myFlow");
    state = new TransitionableState(flow, "state1") {
      protected void doEnter(RequestControlContext context) {
        throw new FlowExecutionException(getFlow().getId(), getId(), "Oops!", new TestException());
      }
    };
    state.getTransitionSet().add(new Transition(toState("end")));
View Full Code Here


        state.getEntryActionList().add(new AbstractAction() {
          protected Event doExecute(RequestContext context) throws Exception {
            throw new NullPointerException("failing");
          }
        });
        new TransitionableState(getFlow(), "showError") {
          protected void doEnter(RequestControlContext context) throws FlowExecutionException {
          }
        };
      }
View Full Code Here

    keyFactory.removeAllFlowExecutionSnapshots(this);
  }

  TransitionDefinition getMatchingTransition(String eventId) {
    FlowSessionImpl session = getActiveSessionInternal();
    TransitionableState currentState = (TransitionableState) session.getState();
    TransitionDefinition transition = currentState.getTransition(eventId);
    if (transition == null) {
      transition = session.getFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

  public StateDefinition getCurrentState() {
    return getFlowExecutionContext().getActiveSession().getState();
  }

  public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException {
    TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState();
    TransitionDefinition transition = state.getTransition(eventId);
    if (transition == null) {
      transition = getRootFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

  /**
   * Creates a new mock flow session that sets a flow with id "mockFlow" as the 'active flow' in state "mockState".
   */
  public MockFlowSession() {
    setDefinition(new Flow("mockFlow"));
    State state = new TransitionableState(definition, "mockState") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
        // nothing to do
      }
    };
    setState(state);
View Full Code Here

  TransitionableState state;

  protected void setUp() {
    flow = new Flow("myFlow");
    state = new TransitionableState(flow, "state1") {
      protected void doEnter(RequestControlContext context) {
        throw new FlowExecutionException(getFlow().getId(), getId(), "Oops!", new TestException());
      }
    };
    state.getTransitionSet().add(new Transition(toState("end")));
View Full Code Here

        state.getEntryActionList().add(new AbstractAction() {
          protected Event doExecute(RequestContext context) throws Exception {
            throw new NullPointerException("failing");
          }
        });
        new TransitionableState(getFlow(), "showError") {
          protected void doEnter(RequestControlContext context) throws FlowExecutionException {
          }
        };
      }
View Full Code Here

  public StateDefinition getCurrentState() {
    return getFlowExecutionContext().getActiveSession().getState();
  }

  public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException {
    TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState();
    TransitionDefinition transition = state.getTransition(eventId);
    if (transition == null) {
      transition = getRootFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

  /**
   * Creates a new mock flow session that sets a flow with id "mockFlow" as the 'active flow' in state "mockState".
   */
  public MockFlowSession() {
    setDefinition(new Flow("mockFlow"));
    State state = new TransitionableState(definition, "mockState") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
        // nothing to do
      }
    };
    setState(state);
View Full Code Here

  TransitionDefinition getMatchingTransition(String eventId) {
    FlowSessionImpl session = getActiveSessionInternal();
    if (session == null) {
      return null;
    }
    TransitionableState currentState = (TransitionableState) session.getState();
    TransitionDefinition transition = currentState.getTransition(eventId);
    if (transition == null) {
      transition = session.getFlow().getGlobalTransition(eventId);
    }
    return transition;
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.TransitionableState

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.