Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.FlowExecutionOutcome


    MutableAttributeMap map = new LocalAttributeMap();
    map.put("foo", "bar");
    map.put("number", "3");
    map.put("required", "9");
    execution.start(map, context);
    FlowExecutionOutcome outcome = execution.getOutcome();
    assertEquals("end", outcome.getId());
    assertEquals("bar", outcome.getOutput().get("foo"));
    assertEquals("bar", outcome.getOutput().get("differentName"));
    assertEquals(new Integer(3), outcome.getOutput().get("number"));
    assertEquals(new Integer(3), outcome.getOutput().get("required"));
    assertEquals("a literal", outcome.getOutput().get("literal"));
    assertNull(outcome.getOutput().get("notReached"));
  }
View Full Code Here


    execution.hasEnded();
    EasyMock.expectLastCall().andReturn(Boolean.TRUE);

    EasyMock.expect(execution.getDefinition()).andReturn(definition);
    EasyMock.expect(definition.getId()).andReturn("foo");
    EasyMock.expect(execution.getOutcome()).andReturn(new FlowExecutionOutcome("finish", null));

    replayMocks();

    FlowExecutionResult result = flowExecutor.launchExecution("foo", null, context);
    assertTrue(result.isEnded());
View Full Code Here

    EasyMock.expect(execution.getDefinition()).andReturn(definition);
    EasyMock.expect(definition.getId()).andReturn("foo");

    LocalAttributeMap output = new LocalAttributeMap();
    output.put("foo", "bar");
    EasyMock.expect(execution.getOutcome()).andReturn(new FlowExecutionOutcome("finish", output));

    repository.removeFlowExecution(execution);

    lock.unlock();
View Full Code Here

    session.getFlow().end(context, outcome, output);
    flowSessions.removeLast();
    boolean executionEnded = hasEnded();
    if (executionEnded) {
      // set the root flow execution outcome for external clients to use
      this.outcome = new FlowExecutionOutcome(outcome, output);
    }
    listeners.fireSessionEnded(context, session, outcome, output);
    if (!executionEnded) {
      // restore any variables that may have transient references
      getActiveSessionInternal().getFlow().restoreVariables(context);
View Full Code Here

    execution.hasEnded();
    EasyMock.expectLastCall().andReturn(true);

    EasyMock.expect(execution.getDefinition()).andReturn(definition);
    EasyMock.expect(definition.getId()).andReturn("foo");
    EasyMock.expect(execution.getOutcome()).andReturn(new FlowExecutionOutcome("finish", null));

    replayMocks();

    FlowExecutionResult result = flowExecutor.launchExecution("foo", null, context);
    assertTrue(result.isEnded());
View Full Code Here

    EasyMock.expect(execution.getDefinition()).andReturn(definition);
    EasyMock.expect(definition.getId()).andReturn("foo");

    LocalAttributeMap<Object> output = new LocalAttributeMap<Object>();
    output.put("foo", "bar");
    EasyMock.expect(execution.getOutcome()).andReturn(new FlowExecutionOutcome("finish", output));

    repository.removeFlowExecution(execution);

    lock.unlock();
View Full Code Here

    handleExecutionOutcome = true;
    actionRequest.setContextPath("/springtravel");
    actionRequest.addParameter("execution", "12345");
    LocalAttributeMap<Object> output = new LocalAttributeMap<Object>();
    output.put("bar", "baz");
    FlowExecutionOutcome outcome = new FlowExecutionOutcome("finish", output);
    flowExecutor.resumeExecution("12345", actionContext);
    EasyMock.expectLastCall().andReturn(FlowExecutionResult.createEndedResult("bar", outcome));
    EasyMock.replay(new Object[] { flowExecutor });
    controller.handleAction(actionRequest, actionResponse, flowHandler);
    assertTrue(handleExecutionOutcomeCalled);
View Full Code Here

    Map<String, String> parameters = new HashMap<String, String>();
    request.setParameters(parameters);
    flowExecutor.launchExecution("foo", flowInput, 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[] { flowExecutor });
    flowHandlerAdapter.handle(request, response, flowHandler);
    assertEquals("/springtravel/app/foo?bar=baz", response.getRedirectedUrl());
View Full Code Here

    request.setParameters(parameters);
    context.setAjaxRequest(true);
    flowExecutor.launchExecution("foo", flowInput, 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[] { flowExecutor });
    request.addHeader("Accept", "text/html;type=ajax");
    flowHandlerAdapter.handle(request, response, flowHandler);
View Full Code Here

    Map<String, String> parameters = new HashMap<String, String>();
    request.setParameters(parameters);
    flowExecutor.resumeExecution("12345", 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[] { flowExecutor });
    ModelAndView mv = flowHandlerAdapter.handle(request, response, flowHandler);
    assertNull(mv);
View Full Code Here

TOP

Related Classes of org.springframework.webflow.execution.FlowExecutionOutcome

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.