Package org.springframework.webflow.execution

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


    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


        assertNotNull(key1);
        assertEquals(key1, keyFactory.parseFlowExecutionKey(key1.toString()));
      
        final MockExternalContext context1 = new MockExternalContext();
        context1.setEventId("submit");
        execution.resume(context1);

        // Flow state: rendered parent view (following subflow termination)
        assertTrue(execution.isActive());
        assertEquals("parentview", execution.getActiveSession().getScope().get("renderCalled"));
        final FlowExecutionKey key2 = execution.getKey();
View Full Code Here

        assertFalse(key1.equals(key2));
        assertEquals(key2, keyFactory.parseFlowExecutionKey(key2.toString()));

        final MockExternalContext context2 = new MockExternalContext();
        context2.setEventId("submit");
        execution.resume(context2);

        // Flow state: completed
        assertTrue(execution.hasEnded());
    }
   
View Full Code Here

      FlowExecutionKey key = executionRepository.parseFlowExecutionKey(flowExecutionKey);
      FlowExecutionLock lock = executionRepository.getLock(key);
      lock.lock();
      try {
        FlowExecution flowExecution = executionRepository.getFlowExecution(key);
        flowExecution.resume(context);
        if (!flowExecution.hasEnded()) {
          executionRepository.putFlowExecution(flowExecution);
          return createPausedResult(flowExecution);
        } else {
          executionRepository.removeFlowExecution(flowExecution);
View Full Code Here

    FlowExecution execution2 = repository.getFlowExecution(parsedKey);
    assertSame(execution.getDefinition(), execution2.getDefinition());
    assertEquals(execution.getActiveSession().getState().getId(), execution2.getActiveSession().getState().getId());
    MockExternalContext context = new MockExternalContext();
    context.setEventId("foo");
    execution2.resume(context);
    repository.putFlowExecution(execution2);
    assertNotSame(execution.getKey(), execution2.getKey());
  }

  public void testPutFlowExecutionNoKeyAssigned() {
View Full Code Here

    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());
  }

  public void testParsedFlowValidationHints() {
    ClassPathResource res = new ClassPathResource("flow-validation-hints.xml", getClass());
View Full Code Here

      FlowExecutionKey key = executionRepository.parseFlowExecutionKey(flowExecutionKey);
      FlowExecutionLock lock = executionRepository.getLock(key);
      lock.lock();
      try {
        FlowExecution flowExecution = executionRepository.getFlowExecution(key);
        flowExecution.resume(context);
        if (!flowExecution.hasEnded()) {
          executionRepository.putFlowExecution(flowExecution);
          return createPausedResult(flowExecution);
        } else {
          executionRepository.removeFlowExecution(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.