Package org.springframework.webflow.engine.impl

Examples of org.springframework.webflow.engine.impl.FlowExecutionImplFactory


        assertNotNull(bean);
        context.getFlowScope().put("testBean", bean);
        return new Event(this, "success");
      }
    });
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(hibernateListener));
    flowExecution = factory.createFlowExecution(flow);
  }
View Full Code Here


        assertNotNull(bean);
        context.getFlowScope().put("testBean", bean);
        return new Event(this, "success");
      }
    });
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(jpaListener));
    flowExecution = factory.createFlowExecution(flow);
  }
View Full Code Here

        assertTrue(context.getFlashScope().contains("flowExecutionException"));
        assertTrue(context.getFlashScope().contains("rootCauseException"));
        assertTrue(context.getFlashScope().get("rootCauseException") instanceof TestException);
      }
    };
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(listener));
    FlowExecution execution = factory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertTrue("Should have ended", !execution.isActive());
  }
View Full Code Here

  public void testStateExceptionHandlingTransitionNoSuchState() {
    TransitionExecutingFlowExecutionExceptionHandler handler = new TransitionExecutingFlowExecutionExceptionHandler();
    handler.add(TestException.class, "end");
    flow.getExceptionHandlerSet().add(handler);
    FlowExecution execution = new FlowExecutionImplFactory().createFlowExecution(flow);
    try {
      execution.start(null, new MockExternalContext());
      fail("Should have failed no such state");
    } catch (IllegalArgumentException e) {
    }
View Full Code Here

    } catch (IllegalArgumentException e) {
    }
  }

  public void testStateExceptionHandlingRethrow() {
    FlowExecution execution = new FlowExecutionImplFactory().createFlowExecution(flow);
    try {
      execution.start(null, new MockExternalContext());
      fail("Should have rethrown");
    } catch (FlowExecutionException e) {
      // expected
View Full Code Here

      public Flow createFlow() throws FlowBuilderException {
        return Flow.create(getContext().getFlowId(), getContext().getFlowAttributes());
      }
    };
    Flow flow = new FlowAssembler(builder, new MockFlowBuilderContext("flow")).assembleFlow();
    FlowExecution execution = new FlowExecutionImplFactory().createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertTrue(execution.isActive());
  }
View Full Code Here

    notReached.setOutputs(singleList(new OutputModel("notReached", "flowScope.foo")));

    model.setStates(doubleList(end, notReached));

    Flow flow = getFlow(model);
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    FlowExecution execution = factory.createFlowExecution(flow);
    MockExternalContext context = new MockExternalContext();
    MutableAttributeMap map = new LocalAttributeMap();
    map.put("foo", "bar");
    map.put("number", "3");
    map.put("required", "9");
View Full Code Here

      public FlowDefinition getFlowDefinition(String flowId) throws NoSuchFlowDefinitionException,
          FlowDefinitionConstructionException {
        return flow;
      }
    };
    FlowExecutionFactory executionFactory = new FlowExecutionImplFactory();
    SerializedFlowExecutionSnapshotFactory snapshotFactory = new SerializedFlowExecutionSnapshotFactory(
        executionFactory, locator);
    repository = new DefaultFlowExecutionRepository(conversationManager, snapshotFactory);
  }
View Full Code Here

      e.printStackTrace();
    }
  }

  public void testPutFlowExecution() {
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionKeyFactory(repository);
    FlowExecution execution = factory.createFlowExecution(flow);
    execution.start(null, new MockExternalContext());
    assertNotNull(execution.getKey());
    repository.putFlowExecution(execution);
    String key = execution.getKey().toString();
    FlowExecutionKey parsedKey = repository.parseFlowExecutionKey(key);
View Full Code Here

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

  public void testPutFlowExecutionNoKeyAssigned() {
    FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    FlowExecution execution = factory.createFlowExecution(flow);
    try {
      repository.putFlowExecution(execution);
      fail("Should have failed");
    } catch (IllegalStateException e) {
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.impl.FlowExecutionImplFactory

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.