Package org.springframework.webflow.core

Examples of org.springframework.webflow.core.FlowException


    FlowHandler flowHandler = (FlowHandler) handler;
    checkAndPrepare(request, response);
    populateConveniencePortletProperties(request);
    PortletSession session = request.getPortletSession(false);
    if (session != null) {
      FlowException e = (FlowException) session.getAttribute(ACTION_REQUEST_FLOW_EXCEPTION_ATTRIBUTE);
      if (e != null) {
        session.removeAttribute(ACTION_REQUEST_FLOW_EXCEPTION_ATTRIBUTE);
        return handleException(e, flowHandler, request, response);
      }
    }
View Full Code Here


    EasyMock.verify(new Object[] { flowExecutor });
  }

  public void testDefaultHandleFlowException() throws Exception {
    PortletSession session = renderRequest.getPortletSession();
    final FlowException flowException = new FlowException("Error") {
    };
    session.setAttribute("actionRequestFlowException", flowException);
    try {
      controller.handleRender(renderRequest, renderResponse, flowHandler);
      fail("Should have thrown exception");
View Full Code Here

  public void testDefaultHandleNoSuchFlowExecutionException() throws Exception {
    actionRequest.setContextPath("/springtravel");
    actionRequest.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", actionContext);
    FlowException flowException = new NoSuchFlowExecutionException(new MockFlowExecutionKey("12345"), null);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleAction(actionRequest, actionResponse, flowHandler);
    assertNotNull(actionRequest.getPortletSession().getAttribute("actionRequestFlowException"));
    EasyMock.verify(new Object[] { flowExecutor });
View Full Code Here

    EasyMock.verify(new Object[] { flowExecutor });
  }

  public void testHandleFlowExceptionCustomFlowHandler() throws Exception {
    handleException = true;
    final FlowException flowException = new FlowException("Error") {
    };
    renderRequest.setContextPath("/springtravel");
    flowExecutor.launchExecution("foo", flowInput, renderContext);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
View Full Code Here

  }

  public void testHandleFlowExceptionFromSession() throws Exception {
    handleException = true;
    PortletSession session = renderRequest.getPortletSession();
    final FlowException flowException = new FlowException("Error") {
    };
    session.setAttribute("actionRequestFlowException", flowException);
    ModelAndView mv = controller.handleRender(renderRequest, renderResponse, flowHandler);
    assertEquals("error", mv.getViewName());
  }
View Full Code Here

  public void testDefaultHandleFlowException() throws Exception {
    setupRequest("/springtravel", "/app", "/foo", "GET");
    Map<String, String> parameters = new HashMap<String, String>();
    request.setParameters(parameters);
    flowExecutor.launchExecution("foo", flowInput, context);
    FlowException flowException = new FlowException("Error") {
    };
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    try {
      flowHandlerAdapter.handle(request, response, flowHandler);
View Full Code Here

  public void testDefaultHandleNoSuchFlowExecutionException() throws Exception {
    setupRequest("/springtravel", "/app", "/foo", "GET");
    request.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", context);
    FlowException flowException = new NoSuchFlowExecutionException(new MockFlowExecutionKey("12345"), null);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    flowHandlerAdapter.handle(request, response, flowHandler);
    assertEquals("/springtravel/app/foo", response.getRedirectedUrl());
    EasyMock.verify(new Object[] { flowExecutor });
View Full Code Here

  public void testDefaultHandleNoSuchFlowExecutionExceptionAjaxRequest() throws Exception {
    setupRequest("/springtravel", "/app", "/foo", "GET");
    request.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", context);
    FlowException flowException = new NoSuchFlowExecutionException(new MockFlowExecutionKey("12345"), null);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
    context.setAjaxRequest(true);
    request.addHeader("Accept", "text/html;type=ajax");
    flowHandlerAdapter.handle(request, response, flowHandler);
View Full Code Here

    EasyMock.verify(new Object[] { flowExecutor });
  }

  public void testHandleFlowExceptionCustomFlowHandler() throws Exception {
    handleException = true;
    final FlowException flowException = new FlowException("Error") {
    };
    setupRequest("/springtravel", "/app", "/foo", "GET");
    flowExecutor.launchExecution("foo", flowInput, context);
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { flowExecutor });
View Full Code Here

    request.setServletPath("/app");
    request.setPathInfo("/foo");
    request.setRequestURI("/springtravel/app/foo");
    request.setMethod("GET");
    executor.launchExecution("foo", null, context);
    FlowException flowException = new FlowException("Error") {
    };
    EasyMock.expectLastCall().andThrow(flowException);
    EasyMock.replay(new Object[] { executor });
    try {
      controller.handleRequest(request, response);
View Full Code Here

TOP

Related Classes of org.springframework.webflow.core.FlowException

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.