/** * Try to handle given exception using execution exception handlers registered at the flow level. Returns null if no * handler handled the exception. * @return true if the exception was handled */ private boolean tryFlowHandlers(FlowExecutionException exception, RequestControlContext context) { return getActiveSessionInternal().getFlow().handleException(exception, context); }
/** * Try to handle given exception using execution exception handlers registered at the flow level. Returns null if no * handler handled the exception. */ private ViewSelection tryFlowHandlers(FlowExecutionException exception, RequestControlContext context) { return getCurrentFlow().handleException(exception, context); }
/** * Try to handle given exception using execution exception handlers registered at the flow level. Returns null if no * handler handled the exception. * @return true if the exception was handled */ private boolean tryFlowHandlers(FlowExecutionException exception, RequestControlContext context) { return getCurrentFlow().handleException(exception, context); }
/** * Try to handle given exception using execution exception handlers registered at the flow level. Returns null if no * handler handled the exception. * @return true if the exception was handled */ private boolean tryFlowHandlers(FlowExecutionException exception, RequestControlContext context) { return getActiveSessionInternal().getFlow().handleException(exception, context); }
public void testHandleExceptionNoMatch() { MockRequestControlContext context = new MockRequestControlContext(flow); FlowExecutionException e = new FlowExecutionException(flow.getId(), flow.getStartState().getId(), "Oops!", new TestException()); try { flow.handleException(e, context); } catch (FlowExecutionException ex) { // expected } }
public void testHandleException() { flow.getExceptionHandlerSet().add( new TransitionExecutingFlowExecutionExceptionHandler().add(TestException.class, "myState2")); MockRequestControlContext context = new MockRequestControlContext(flow); context.setCurrentState(flow.getStateInstance("myState1")); FlowExecutionException e = new FlowExecutionException(flow.getId(), flow.getStartState().getId(), "Oops!", new TestException()); flow.handleException(e, context); assertFalse(context.getFlowExecutionContext().isActive()); }