Package org.springframework.webflow.engine.support

Examples of org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler


    assertEquals("foo", sessionOutput.get("attr"));
  }

  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);
View Full Code Here


      return new FlowExecutionExceptionHandler[0];
    }
  }

  private FlowExecutionExceptionHandler parseTransitionExecutingExceptionHandler(TransitionModel transition) {
    TransitionExecutingFlowExecutionExceptionHandler handler = new TransitionExecutingFlowExecutionExceptionHandler();
    Class exceptionClass = toClass(transition.getOnException());
    TargetStateResolver targetStateResolver = (TargetStateResolver) fromStringTo(TargetStateResolver.class)
        .execute(transition.getTo());
    handler.add(exceptionClass, targetStateResolver);
    handler.getActionList().addAll(parseActions(transition.getActions()));
    return handler;
  }
View Full Code Here

    assertEquals("foo", sessionOutput.get("attr"));
  }

  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);
View Full Code Here

      return new FlowExecutionExceptionHandler[0];
    }
  }

  private FlowExecutionExceptionHandler parseTransitionExecutingExceptionHandler(TransitionModel transition) {
    TransitionExecutingFlowExecutionExceptionHandler handler = new TransitionExecutingFlowExecutionExceptionHandler();
    Class<Throwable> exceptionClass = toClass(transition.getOnException(), Throwable.class);
    TargetStateResolver targetStateResolver = (TargetStateResolver) fromStringTo(TargetStateResolver.class)
        .execute(transition.getTo());
    handler.add(exceptionClass, targetStateResolver);
    handler.getActionList().addAll(parseActions(transition.getActions()));
    return handler;
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.support.TransitionExecutingFlowExecutionExceptionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.