Package org.springframework.webflow.executor

Examples of org.springframework.webflow.executor.FlowExecutionResult


    request.setServletPath("/app");
    request.setPathInfo("/foo");
    request.setRequestURI("/springtravel/app/foo");
    request.setMethod("GET");
    executor.launchExecution("foo", input, context);
    FlowExecutionResult result = FlowExecutionResult.createPausedResult("foo", "12345");
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { executor });
    ModelAndView mv = controller.handleRequest(request, response);
    assertNull(mv);
    EasyMock.verify(new Object[] { executor });
View Full Code Here


    request.setMethod("GET");
    executor.launchExecution("foo", input, context);
    LocalAttributeMap<Object> output = new LocalAttributeMap<Object>();
    output.put("bar", "baz");
    FlowExecutionOutcome outcome = new FlowExecutionOutcome("finish", output);
    FlowExecutionResult result = FlowExecutionResult.createEndedResult("foo", outcome);
    EasyMock.expectLastCall().andReturn(result);
    EasyMock.replay(new Object[] { executor });
    ModelAndView mv = controller.handleRequest(request, response);
    assertNull(mv);
    assertEquals("/springtravel/app/foo?bar=baz", response.getRedirectedUrl());
View Full Code Here

    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<Object> 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

    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

  private ModelAndView startFlowRender(FlowHandler flowHandler, MutableAttributeMap<Object> 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 flowEx) {
      return handleException(flowEx, flowHandler, request, response);
    }
View Full Code Here

  }

  private ModelAndView startFlowResource(FlowHandler flowHandler, ResourceRequest request, ResourceResponse response) {
    PortletExternalContext context = createPortletExternalContext(request, response);
    try {
      FlowExecutionResult result = flowExecutor.launchExecution(flowHandler.getFlowId(), null, context);
      if (result.isPaused()) {
        flowUrlHandler.setFlowExecutionInSession(result.getPausedKey(), request);
      }
      return null;
    } catch (FlowException flowEx) {
      return handleResourceException(flowEx, flowHandler, request, response);
    }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.executor.FlowExecutionResult

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.