/** * Creates and adds all exception handlers to the flow built by this builder. * @throws FlowBuilderException an exception occurred building this flow */ public void buildExceptionHandlers() throws FlowBuilderException { getFlow().getExceptionHandlerSet().addAll( parseExceptionHandlers(flowModel.getExceptionHandlers(), flowModel.getGlobalTransitions())); }
public void merge(Model model) { FlowModel flow = (FlowModel) model; setParent(null); setStartStateId(merge(getStartStateId(), flow.getStartStateId())); setAttributes(merge(getAttributes(), flow.getAttributes())); setSecured((SecuredModel) merge(getSecured(), flow.getSecured())); setPersistenceContext((PersistenceContextModel) merge(getPersistenceContext(), flow.getPersistenceContext())); setVars(merge(getVars(), flow.getVars(), false)); setInputs(merge(getInputs(), flow.getInputs())); setOutputs(merge(getOutputs(), flow.getOutputs())); setOnStartActions(merge(getOnStartActions(), flow.getOnStartActions(), false)); setStates(merge(getStates(), flow.getStates())); setGlobalTransitions(merge(getGlobalTransitions(), flow.getGlobalTransitions())); setOnEndActions(merge(getOnEndActions(), flow.getOnEndActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), flow.getExceptionHandlers())); setBeanImports(merge(getBeanImports(), flow.getBeanImports())); }
/** * Creates and adds all exception handlers to the flow built by this builder. * @throws FlowBuilderException an exception occurred building this flow */ public void buildExceptionHandlers() throws FlowBuilderException { getFlow().getExceptionHandlerSet().addAll( parseExceptionHandlers(flowModel.getExceptionHandlers(), flowModel.getGlobalTransitions())); }
/** * Creates and adds all exception handlers to the flow built by this builder. * @throws FlowBuilderException an exception occurred building this flow */ public void buildExceptionHandlers() throws FlowBuilderException { getFlow().getExceptionHandlerSet().addAll( parseExceptionHandlers(flowModel.getExceptionHandlers(), flowModel.getGlobalTransitions())); }
public void testParseFlowExceptionHandler() { ClassPathResource res = new ClassPathResource("flow-exception-handler.xml", getClass()); XmlFlowModelBuilder builder = new XmlFlowModelBuilder(res); DefaultFlowModelHolder holder = new DefaultFlowModelHolder(builder); FlowModel model = holder.getFlowModel(); assertEquals("foo1", model.getExceptionHandlers().get(0).getBean()); assertEquals("foo2", model.getStateById("state1").getExceptionHandlers().get(0).getBean()); assertEquals("foo3", model.getStateById("state2").getExceptionHandlers().get(0).getBean()); assertEquals("foo4", model.getStateById("state3").getExceptionHandlers().get(0).getBean()); assertEquals("foo5", model.getStateById("state4").getExceptionHandlers().get(0).getBean()); assertEquals("foo6", model.getStateById("state5").getExceptionHandlers().get(0).getBean()); }
public void testMergeExceptionHandlers() { FlowModel child = new FlowModel(); child.setExceptionHandlers(asList(new ExceptionHandlerModel("bean1"), new ExceptionHandlerModel("bean2"))); FlowModel parent = new FlowModel(); parent.setExceptionHandlers(asList(new ExceptionHandlerModel("bean2"), new ExceptionHandlerModel("bean3"))); child.merge(parent); assertEquals(4, child.getExceptionHandlers().size()); }
public void merge(Model model) { FlowModel flow = (FlowModel) model; setParent(null); setStartStateId(merge(getStartStateId(), flow.getStartStateId())); setAttributes(merge(getAttributes(), flow.getAttributes())); setSecured((SecuredModel) merge(getSecured(), flow.getSecured())); setPersistenceContext((PersistenceContextModel) merge(getPersistenceContext(), flow.getPersistenceContext())); setVars(merge(getVars(), flow.getVars(), false)); setInputs(merge(getInputs(), flow.getInputs())); setOutputs(merge(getOutputs(), flow.getOutputs())); setOnStartActions(merge(getOnStartActions(), flow.getOnStartActions(), false)); setStates(merge(getStates(), flow.getStates())); setGlobalTransitions(merge(getGlobalTransitions(), flow.getGlobalTransitions())); setOnEndActions(merge(getOnEndActions(), flow.getOnEndActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), flow.getExceptionHandlers())); setBeanImports(merge(getBeanImports(), flow.getBeanImports())); }
public void merge(Model model) { FlowModel flow = (FlowModel) model; setParent(null); setStartStateId(merge(getStartStateId(), flow.getStartStateId())); setAttributes(merge(getAttributes(), flow.getAttributes())); setSecured((SecuredModel) merge(getSecured(), flow.getSecured())); setPersistenceContext((PersistenceContextModel) merge(getPersistenceContext(), flow.getPersistenceContext())); setVars(merge(getVars(), flow.getVars(), false)); setInputs(merge(getInputs(), flow.getInputs())); setOutputs(merge(getOutputs(), flow.getOutputs())); setOnStartActions(merge(getOnStartActions(), flow.getOnStartActions(), false)); setStates(merge(getStates(), flow.getStates())); setGlobalTransitions(merge(getGlobalTransitions(), flow.getGlobalTransitions())); setOnEndActions(merge(getOnEndActions(), flow.getOnEndActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), flow.getExceptionHandlers())); setBeanImports(merge(getBeanImports(), flow.getBeanImports())); }