Examples of FlowExecutionException


Examples of org.springframework.webflow.execution.FlowExecutionException

    }
  }

  public void testStartFlowExecutionExceptionThrownByState() {
    Flow flow = new Flow("flow");
    final FlowExecutionException e = new FlowExecutionException("flow", "state", "Oops");
    new State(flow, "state") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
        throw e;
      }
    };
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

  public void testStartExceptionThrownByStateHandledByFlowExceptionHandler() {
    Flow flow = new Flow("flow");
    StubFlowExecutionExceptionHandler exceptionHandler = new StubFlowExecutionExceptionHandler();
    flow.getExceptionHandlerSet().add(exceptionHandler);
    final FlowExecutionException e = new FlowExecutionException("flow", "state", "Oops");
    new State(flow, "state") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
        throw e;
      }
    };
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

  }

  public void testStartExceptionThrownByStateHandledByStateExceptionHandler() {
    Flow flow = new Flow("flow");
    flow.getExceptionHandlerSet().add(new StubFlowExecutionExceptionHandler());
    final FlowExecutionException e = new FlowExecutionException("flow", "state", "Oops");
    State s = new State(flow, "state") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
        throw e;
      }
    };
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

    Flow flow = new Flow("flow");
    ExceptionThrowingExceptionHandler exceptionHandler = new ExceptionThrowingExceptionHandler(true);
    flow.getExceptionHandlerSet().add(exceptionHandler);
    new State(flow, "state") {
      protected void doEnter(RequestControlContext context) throws FlowExecutionException {
        throw new FlowExecutionException("flow", "state", "Oops");
      }
    };
    FlowExecutionImpl execution = new FlowExecutionImpl(flow);
    MockExternalContext context = new MockExternalContext();
    assertFalse(execution.hasStarted());
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

  public void testResumeFlowExecutionException() {
    Flow flow = new Flow("flow");
    ViewState state = new ViewState(flow, "view", new StubViewFactory()) {
      public void resume(RequestControlContext context) {
        throw new FlowExecutionException("flow", "view", "oops");
      }
    };
    MockFlowExecutionListener mockListener = new MockFlowExecutionListener();
    FlowExecutionListener[] listeners = new FlowExecutionListener[] { mockListener };
    FlowExecutionImpl execution = new FlowExecutionImpl(flow);
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

    FlowExecutionExceptionHandlerSet handlerSet = new FlowExecutionExceptionHandlerSet();
    handlerSet.add(new TestStateExceptionHandler(NullPointerException.class, "null"));
    handlerSet.add(new TestStateExceptionHandler(FlowExecutionException.class, "execution 1"));
    handlerSet.add(new TestStateExceptionHandler(FlowExecutionException.class, "execution 2"));
    assertEquals(3, handlerSet.size());
    FlowExecutionException e = new FlowExecutionException("flowId", "stateId", "Test");
    assertTrue(handlerSet.handleException(e, context));
    assertFalse(context.getFlowScope().contains("null"));
    assertTrue(context.getFlowScope().contains("execution 1"));
    assertFalse(context.getFlowScope().contains("execution 2"));
  }
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

    public void handle(FlowExecutionException exception, RequestControlContext context) {
      this.handleCount++;
      if (throwOnlyOnce && "nested exception".equals(exception.getMessage())) {
        // No more exceptions
      } else {
        throw new FlowExecutionException(exception.getFlowId(), exception.getStateId(), "nested exception");
      }
    }
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

    assertSessionBound();

    TestBean bean1 = new TestBean("Keith Donald");
    hibernateTemplate.save(bean1);
    assertEquals("Table should still only have one row", 1, jdbcTemplate.queryForInt("select count(*) from T_BEAN"));
    hibernateListener.exceptionThrown(context, new FlowExecutionException("bla", "bla", "bla"));
    assertEquals("Table should still only have one row", 1, jdbcTemplate.queryForInt("select count(*) from T_BEAN"));
    assertSessionNotBound();

  }
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

    assertEquals("Table should only have one row", 1, jdbcTemplate.queryForInt("select count(*) from T_BEAN"));
    MockRequestContext context = new MockRequestContext();
    MockFlowSession flowSession = new MockFlowSession();
    flowSession.getDefinition().getAttributes().put("persistenceContext", "true");
    assertSessionNotBound();
    hibernateListener.exceptionThrown(context, new FlowExecutionException("foo", "bar", "test"));
    assertSessionNotBound();
  }
View Full Code Here

Examples of org.springframework.webflow.execution.FlowExecutionException

      }
      else if (hintsValue instanceof Object[]) {
        return (Object[]) hintsValue;
      }
      else {
        throw new FlowExecutionException(flowId, stateId,
            "Failed to resolve validation hints [" + hintsValue + "]");
      }
    }
    catch (EvaluationException e) {
      throw new FlowExecutionException(flowId, stateId,
          "Failed to resolve validation hints expression [" + expr + "]", e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.