targetState.enter(context); if (logger.isDebugEnabled()) { if (context.getFlowExecutionContext().isActive()) {
/** * Start a new session for this flow in its start state. This boils down to the following: * <ol> * <li>Create (setup) all registered flow variables ({@link #addVariable(FlowVariable)}) in flow scope.</li> * <li>Map provided input data into the flow. Typically data will be mapped into flow scope using the registered * input mapper ({@link #setInputMapper(Mapper)}).</li> * <li>Execute all registered start actions ( {@link #getStartActionList()}).</li> * <li>Enter the configured start state ({@link #setStartState(State)})</li> * </ol> * @param context the flow execution control context * @param input eligible input into the session * @throws FlowExecutionException when an exception occurs starting the flow */ public void start(RequestControlContext context, MutableAttributeMap<?> input) throws FlowExecutionException { assertStartStateSet(); createVariables(context); if (inputMapper != null) { MappingResults results = inputMapper.map(input, context); if (results != null && results.hasErrorResults()) { throw new FlowInputMappingException(getId(), results); } } startActionList.execute(context); startState.enter(context); }
/** * Start a new session for this flow in its start state. This boils down to the following: * <ol> * <li>Create (setup) all registered flow variables ({@link #addVariable(FlowVariable)}) in flow scope.</li> * <li>Map provided input data into the flow execution control context. Typically data will be mapped into flow * scope using the registered input mapper ({@link #setInputMapper(AttributeMapper)}).</li> * <li>Execute all registered start actions ({@link #getStartActionList()}).</li> * <li>Enter the configured start state ({@link #setStartState(State)})</li> * </ol> * @param context the flow execution control context * @param input eligible input into the session * @throws FlowExecutionException when an exception occurs starting the flow */ public ViewSelection start(RequestControlContext context, MutableAttributeMap input) throws FlowExecutionException { createVariables(context); if (inputMapper != null) { inputMapper.map(input, context, null); } startActionList.execute(context); return startState.enter(context); }
targetState.enter(context); if (logger.isDebugEnabled()) { if (context.getFlowExecutionContext().isActive()) {
targetState.enter(context); if (logger.isDebugEnabled()) { if (context.getFlowExecutionContext().isActive()) {
context.setLastTransition(this); selectedView = targetState.enter(context); } else { if (sourceState != null && sourceState instanceof TransitionableState) {
/** * Start a new session for this flow in its start state. This boils down to the following: * <ol> * <li>Create (setup) all registered flow variables ({@link #addVariable(FlowVariable)}) in flow scope.</li> * <li>Map provided input data into the flow. Typically data will be mapped into flow scope using the registered * input mapper ({@link #setInputMapper(Mapper)}).</li> * <li>Execute all registered start actions ( {@link #getStartActionList()}).</li> * <li>Enter the configured start state ({@link #setStartState(State)})</li> * </ol> * @param context the flow execution control context * @param input eligible input into the session * @throws FlowExecutionException when an exception occurs starting the flow */ public void start(RequestControlContext context, MutableAttributeMap<?> input) throws FlowExecutionException { assertStartStateSet(); createVariables(context); if (inputMapper != null) { MappingResults results = inputMapper.map(input, context); if (results != null && results.hasErrorResults()) { throw new FlowInputMappingException(getId(), results); } } startActionList.execute(context); startState.enter(context); }
/** * Start a new session for this flow in its start state. This boils down to the following: * <ol> * <li>Create (setup) all registered flow variables ({@link #addVariable(FlowVariable)}) in flow scope.</li> * <li>Map provided input data into the flow. Typically data will be mapped into flow scope using the registered * input mapper ({@link #setInputMapper(Mapper)}).</li> * <li>Execute all registered start actions ( {@link #getStartActionList()}).</li> * <li>Enter the configured start state ({@link #setStartState(State)})</li> * </ol> * @param context the flow execution control context * @param input eligible input into the session * @throws FlowExecutionException when an exception occurs starting the flow */ public void start(RequestControlContext context, MutableAttributeMap input) throws FlowExecutionException { assertStartStateSet(); createVariables(context); if (inputMapper != null) { MappingResults results = inputMapper.map(input, context); if (results != null && results.hasErrorResults()) { throw new FlowInputMappingException(getId(), results); } } startActionList.execute(context); startState.enter(context); }
public void testStateEnter() { assertEquals("myState", state.getId()); MockRequestControlContext context = new MockRequestControlContext(flow); state.enter(context); assertEquals(state, context.getCurrentState()); assertTrue(entered); }
public void testStateEnterWithEntryAction() { TestAction action = new TestAction(); state.getEntryActionList().add(action); MockRequestControlContext context = new MockRequestControlContext(flow); state.enter(context); assertEquals(state, context.getCurrentState()); assertTrue(action.isExecuted()); assertTrue(entered); assertEquals(1, action.getExecutionCount()); }