void setCurrentState(State newState, RequestContext context) { listeners.fireStateEntering(context, newState); FlowSessionImpl session = getActiveSessionInternal(); State previousState = (State) session.getState(); session.setCurrentState(newState); listeners.fireStateEntered(context, previousState); }
/** * Jump to a state of the currently active flow. If this execution has not been started, a new session will be * activated and its current state will be set. This is a implementation-internal method that bypasses the * {@link #start(MutableAttributeMap, ExternalContext)} operation and allows for jumping to an arbitrary flow state. * Useful for testing. * @param stateId the identifier of the state to jump to */ public void setCurrentState(String stateId) { FlowSessionImpl session; if (status == FlowExecutionStatus.NOT_STARTED) { session = activateSession(flow); status = FlowExecutionStatus.ACTIVE; } else { session = getActiveSessionInternal(); } State state = session.getFlow().getStateInstance(stateId); session.setCurrentState(state); }
void setCurrentState(State newState, RequestContext context) { listeners.fireStateEntering(context, newState); FlowSessionImpl session = getActiveSessionInternal(); State previousState = (State) session.getState(); session.setCurrentState(newState); listeners.fireStateEntered(context, previousState); }
void setCurrentState(State newState, RequestContext context) { listeners.fireStateEntering(context, newState); FlowSessionImpl session = getActiveSessionInternal(); State previousState = (State) session.getState(); session.setCurrentState(newState); listeners.fireStateEntered(context, previousState); }
/** * Jump to a state of the currently active flow. If this execution has not been started, a new session will be * activated and its current state will be set. This is a implementation-internal method that bypasses the * {@link #start(MutableAttributeMap, ExternalContext)} operation and allows for jumping to an arbitrary flow state. * Useful for testing. * @param stateId the identifier of the state to jump to */ public void setCurrentState(String stateId) { FlowSessionImpl session; if (status == FlowExecutionStatus.NOT_STARTED) { session = activateSession(flow); status = FlowExecutionStatus.ACTIVE; } else { session = getActiveSessionInternal(); } State state = session.getFlow().getStateInstance(stateId); session.setCurrentState(state); }
/** * Jump to a state of the currently active flow. If this execution has not been started, a new session will be * activated and its current state will be set. This is a implementation-internal method that bypasses the * {@link #start(MutableAttributeMap, ExternalContext)} operation and allows for jumping to an arbitrary flow state. * Useful for testing. * @param stateId the identifier of the state to jump to */ public void setCurrentState(String stateId) { FlowSessionImpl session; if (started) { session = getActiveSessionInternal(); } else { session = activateSession(flow); started = true; } State state = session.getFlow().getStateInstance(stateId); session.setCurrentState(state); }