Package org.springframework.webflow.execution

Examples of org.springframework.webflow.execution.FlowExecution.start()


    assertEquals(execution.getActiveSession().getState().getId(), execution2.getActiveSession().getState().getId());
  }

  public void testPutFlowExecutionNextSnapshotId() {
    FlowExecution execution = executionFactory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertNotNull(execution.getKey());
    repository.putFlowExecution(execution);
    String key = execution.getKey().toString();
    FlowExecutionKey parsedKey = repository.parseFlowExecutionKey(key);
    FlowExecution execution2 = repository.getFlowExecution(parsedKey);
View Full Code Here


    }
  }

  public void testRemoveFlowExecution() {
    FlowExecution execution = executionFactory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertNotNull(execution.getKey());
    repository.putFlowExecution(execution);
    repository.removeFlowExecution(execution);
    try {
      repository.getFlowExecution(execution.getKey());
View Full Code Here

    }
  }

  public void testRemoveNoSuchFlowExecution() {
    FlowExecution execution = executionFactory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    try {
      repository.removeFlowExecution(execution);
      repository.removeFlowExecution(execution);
      fail("Should have failed");
    } catch (NoSuchFlowExecutionException e) {
View Full Code Here

    assertEquals("e12345s3", repository.getKey(execution).toString());
  }

  public void testUpdate() {
    FlowExecution execution = executionFactory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    repository.putFlowExecution(execution);
    execution.getActiveSession().getScope().put("foo", "bar");
    repository.updateFlowExecutionSnapshot(execution);
    FlowExecution execution2 = repository.getFlowExecution(execution.getKey());
    assertEquals("bar", execution2.getActiveSession().getScope().get("foo"));
View Full Code Here

    assertEquals("bar", execution2.getActiveSession().getScope().get("foo"));
  }

  public void testRemove() {
    FlowExecution execution = executionFactory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    repository.putFlowExecution(execution);
    repository.removeFlowExecutionSnapshot(execution);
    try {
      repository.getFlowExecution(execution.getKey());
      fail("Should have failed");
View Full Code Here

    }
  }

  public void testRemoveAll() {
    FlowExecution execution = executionFactory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    repository.putFlowExecution(execution);
    repository.removeAllFlowExecutionSnapshots(execution);
    try {
      repository.getFlowExecution(execution.getKey());
      fail("Should have failed");
View Full Code Here

    MockExternalContext context = new MockExternalContext();
    MutableAttributeMap<Object> map = new LocalAttributeMap<Object>();
    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"));
View Full Code Here

      }
    }));
    FlowExecution execution = factory.createFlowExecution(flow);
    FormAction action = (FormAction) flow.getApplicationContext().getBean("formAction");
    assertFalse(((TestBeanValidator) action.getValidator()).getInvoked());
    execution.start(null, new MockExternalContext());
    MockExternalContext context = new MockExternalContext();
    context.setEventId("submit");
    execution.resume(context);
    assertTrue(((TestBeanValidator) action.getValidator()).getInvoked());
  }
View Full Code Here

        logger.debug("Launching new execution of flow '" + flowId + "' with input " + input);
      }
      ExternalContextHolder.setExternalContext(context);
      FlowDefinition flowDefinition = definitionLocator.getFlowDefinition(flowId);
      FlowExecution flowExecution = executionFactory.createFlowExecution(flowDefinition);
      flowExecution.start(input, context);
      if (!flowExecution.hasEnded()) {
        FlowExecutionLock lock = executionRepository.getLock(flowExecution.getKey());
        lock.lock();
        try {
          executionRepository.putFlowExecution(flowExecution);
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.