/** * Configure common properties for a state. */ private void configureCommonProperties(State state, Action[] entryActions, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap<?> attributes) { state.getEntryActionList().addAll(entryActions); state.getExceptionHandlerSet().addAll(exceptionHandlers); state.getAttributes().putAll(attributes); } }
/** * Configure common properties for a state. */ private void configureCommonProperties(State state, Action[] entryActions, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap<?> attributes) { state.getEntryActionList().addAll(entryActions); state.getExceptionHandlerSet().addAll(exceptionHandlers); state.getAttributes().putAll(attributes); } }
var acts = StreamSupport.stream(state.getEntryActionList().spliterator(), false) .map(Object::toString) .collect(Collectors.toList()); stateMap.put("isRedirect", ((ViewState) state).getRedirect()); acts = StreamSupport.stream(state.getEntryActionList().spliterator(), false) .map(Object::toString) .collect(Collectors.toList());
/** * Configure common properties for a state. */ private void configureCommonProperties(State state, Action[] entryActions, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap attributes) { state.getEntryActionList().addAll(entryActions); state.getExceptionHandlerSet().addAll(exceptionHandlers); state.getAttributes().putAll(attributes); } }
/** * Configure common properties for a state. */ private void configureCommonProperties(State state, Action[] entryActions, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap attributes) { state.getEntryActionList().addAll(entryActions); state.getExceptionHandlerSet().addAll(exceptionHandlers); state.getAttributes().putAll(attributes); } }
/** * Configure common properties for a state. */ private void configureCommonProperties(State state, Action[] entryActions, FlowExecutionExceptionHandler[] exceptionHandlers, AttributeMap attributes) { state.getEntryActionList().addAll(entryActions); state.getExceptionHandlerSet().addAll(exceptionHandlers); state.getAttributeMap().putAll(attributes); } }
public void buildStates() throws FlowBuilderException { State state = new EndState(getFlow(), "end"); 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 { } }; }
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()); }