private FlowExecutionExceptionHandler parseCustomExceptionHandler(ExceptionHandlerModel exceptionHandler) { return getLocalContext().getApplicationContext().getBean(exceptionHandler.getBean(), FlowExecutionExceptionHandler.class); }
private FlowExecutionExceptionHandler parseCustomExceptionHandler(ExceptionHandlerModel exceptionHandler) { return getLocalContext().getApplicationContext().getBean(exceptionHandler.getBean(), FlowExecutionExceptionHandler.class); }
private FlowExecutionExceptionHandler parseCustomExceptionHandler(ExceptionHandlerModel exceptionHandler) { return (FlowExecutionExceptionHandler) getLocalContext().getApplicationContext().getBean( exceptionHandler.getBean(), FlowExecutionExceptionHandler.class); }
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()); }
assertEquals("foo.bar", ((EvaluateModel) child.getOnRenderActions().get(0)).getExpression()); assertEquals("foo", child.getVars().get(0).getName()); assertEquals("foo", child.getExceptionHandlers().get(0).getBean());