/** * Configure common properties for a transitionable state. */ private void configureCommonProperties(TransitionableState state, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap<?> attributes) { configureCommonProperties(state, entryActions, exceptionHandlers, attributes); state.getTransitionSet().addAll(transitions); state.getExitActionList().addAll(exitActions); }
/** * Builds any transitions shared by all states of the flow. * @throws FlowBuilderException an exception occurred building the flow */ public void buildGlobalTransitions() throws FlowBuilderException { getFlow().getGlobalTransitionSet().addAll(parseTransitions(flowModel.getGlobalTransitions())); }
private void parseAndAddGlobalTransitions(Element element, Flow flow) { Element globalTransitionsElement = getChildElementByTagName(element, GLOBAL_TRANSITIONS_ELEMENT); if (globalTransitionsElement != null) { flow.getGlobalTransitionSet().addAll(parseTransitions(globalTransitionsElement)); } }
/** * Configure common properties for a transitionable state. */ private void configureCommonProperties(TransitionableState state, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes) { configureCommonProperties(state, entryActions, exceptionHandlers, attributes); state.getTransitionSet().addAll(transitions); state.getExitActionList().addAll(exitActions); }
/** * Configure common properties for a transitionable state. */ private void configureCommonProperties(TransitionableState state, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap<?> attributes) { configureCommonProperties(state, entryActions, exceptionHandlers, attributes); state.getTransitionSet().addAll(transitions); state.getExitActionList().addAll(exitActions); }
/** * Builds any transitions shared by all states of the flow. * @throws FlowBuilderException an exception occurred building the flow */ public void buildGlobalTransitions() throws FlowBuilderException { getFlow().getGlobalTransitionSet().addAll(parseTransitions(flowModel.getGlobalTransitions())); }
/** * Builds any transitions shared by all states of the flow. * @throws FlowBuilderException an exception occurred building the flow */ public void buildGlobalTransitions() throws FlowBuilderException { getFlow().getGlobalTransitionSet().addAll(parseTransitions(flowModel.getGlobalTransitions())); }
/** * Configure common properties for a transitionable state. */ private void configureCommonProperties(TransitionableState state, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes) { configureCommonProperties(state, entryActions, exceptionHandlers, attributes); state.getTransitionSet().addAll(transitions); state.getExitActionList().addAll(exitActions); }
/** * Configure common properties for a transitionable state. */ private void configureCommonProperties(TransitionableState state, Action[] entryActions, Transition[] transitions, FlowExecutionExceptionHandler[] exceptionHandlers, Action[] exitActions, AttributeMap attributes) { configureCommonProperties(state, entryActions, exceptionHandlers, attributes); state.getTransitionSet().addAll(transitions); state.getExitActionList().addAll(exitActions); }
/** * Clone action state. * * @param source the source * @param target the target */ public void cloneActionState(final ActionState source, final ActionState target) { source.getActionList().forEach(a -> target.getActionList().add(a)); source.getExitActionList().forEach(a -> target.getExitActionList().add(a)); source.getAttributes().asMap().forEach((k, v) -> target.getAttributes().put(k, v)); source.getTransitionSet().forEach(t -> target.getTransitionSet().addAll(t)); val field = ReflectionUtils.findField(target.getExceptionHandlerSet().getClass(), "exceptionHandlers"); ReflectionUtils.makeAccessible(field); val list = (List<FlowExecutionExceptionHandler>) ReflectionUtils.getField(field, target.getExceptionHandlerSet()); list.forEach(h -> source.getExceptionHandlerSet().add(h)); target.setDescription(source.getDescription()); target.setCaption(source.getCaption()); }