Examples of FlowExecutionResult


Examples of org.springframework.webflow.executor.FlowExecutionResult

  public void testResumeFlowRenderRequest() throws Exception {
    renderRequest.setContextPath("/springtravel");
    renderRequest.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", renderContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "123456");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleRender(renderRequest, renderResponse, flowHandler);
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  public void testResumeFlowRenderRequestFromSession() throws Exception {
    renderRequest.setContextPath("/springtravel");
    PortletSession session = renderRequest.getPortletSession();
    session.setAttribute("execution", "12345");
    flowExecutor.resumeExecution("12345", renderContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "123456");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleRender(renderRequest, renderResponse, flowHandler);
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

    FlowHandler flowHandler = (FlowHandler) handler;
    populateConveniencePortletProperties(request);
    String flowExecutionKey = flowUrlHandler.getFlowExecutionKey(request);
    PortletExternalContext context = createPortletExternalContext(request, response);
    try {
      FlowExecutionResult result = flowExecutor.resumeExecution(flowExecutionKey, context);
      if (result.isPaused()) {
        flowUrlHandler.setFlowExecutionRenderParameter(result.getPausedKey(), response);
      } else if (result.isEnded()) {
        handleFlowExecutionOutcome(result.getOutcome(), flowHandler, request, response);
      } else {
        throw new IllegalStateException("Execution result should have been one of [paused] or [ended]");
      }
    } catch (FlowException e) {
      request.getPortletSession().setAttribute(ACTION_REQUEST_FLOW_EXCEPTION_ATTRIBUTE, e);
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  private ModelAndView startFlow(FlowHandler flowHandler, MutableAttributeMap input, RenderRequest request,
      RenderResponse response) {
    PortletExternalContext context = createPortletExternalContext(request, response);
    try {
      FlowExecutionResult result = flowExecutor.launchExecution(flowHandler.getFlowId(), input, context);
      if (result.isPaused()) {
        flowUrlHandler.setFlowExecutionInSession(result.getPausedKey(), request);
      }
      return null;
    } catch (FlowException e) {
      return handleException(e, flowHandler, request, response);
    }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

    checkAndPrepare(request, response, false);
    String flowExecutionKey = flowUrlHandler.getFlowExecutionKey(request);
    if (flowExecutionKey != null) {
      try {
        ServletExternalContext context = createServletExternalContext(request, response);
        FlowExecutionResult result = flowExecutor.resumeExecution(flowExecutionKey, context);
        handleFlowExecutionResult(result, context, request, response, flowHandler);
      } catch (FlowException e) {
        handleFlowException(e, request, response, flowHandler);
      }
    } else {
      try {
        String flowId = getFlowId(flowHandler, request);
        MutableAttributeMap input = getInputMap(flowHandler, request);
        ServletExternalContext context = createServletExternalContext(request, response);
        FlowExecutionResult result = flowExecutor.launchExecution(flowId, input, context);
        handleFlowExecutionResult(result, context, request, response, flowHandler);
      } catch (FlowException e) {
        handleFlowException(e, request, response, flowHandler);
      }
    }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  }

  public void testLaunchFlowRequest() throws Exception {
    renderRequest.setContextPath("/springtravel");
    flowExecutor.launchExecution("foo", flowInput, renderContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "12345");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    ModelAndView mv = controller.handleRender(renderRequest, renderResponse, flowHandler);
    assertNull(mv);
    EasyMock.verify(new Object[] { flowExecutor });
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  public void testResumeFlowActionRequest() throws Exception {
    actionRequest.setContextPath("/springtravel");
    actionRequest.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", actionContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "123456");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleAction(actionRequest, actionResponse, flowHandler);
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  public void testResumeFlowRenderRequest() throws Exception {
    renderRequest.setContextPath("/springtravel");
    renderRequest.addParameter("execution", "12345");
    flowExecutor.resumeExecution("12345", renderContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "123456");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleRender(renderRequest, renderResponse, flowHandler);
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  public void testResumeFlowRenderRequestFromSession() throws Exception {
    renderRequest.setContextPath("/springtravel");
    PortletSession session = renderRequest.getPortletSession();
    session.setAttribute("execution", "12345");
    flowExecutor.resumeExecution("12345", renderContext);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "123456");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleRender(renderRequest, renderResponse, flowHandler);
    EasyMock.verify(new Object[] { flowExecutor });
  }
View Full Code Here

Examples of org.springframework.webflow.executor.FlowExecutionResult

  }

  public void testLaunchFlowRequest() throws Exception {
    setupRequest("/springtravel", "/app", "/whatever", "GET");
    flowExecutor.launchExecution("foo", flowInput, context);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "12345");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { flowExecutor });
    flowHandlerAdapter.handle(request, response, flowHandler);
    EasyMock.verify(new Object[] { flowExecutor });
  }
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.