Package org.springframework.webflow.definition

Examples of org.springframework.webflow.definition.FlowDefinition


  public FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, String flowId, FlowExecutionKey key,
      MutableAttributeMap conversationScope, FlowExecutionKeyFactory keyFactory)
      throws FlowExecutionRestorationFailureException {
    SerializedFlowExecutionSnapshot snapshotImpl = (SerializedFlowExecutionSnapshot) snapshot;
    FlowDefinition def = flowDefinitionLocator.getFlowDefinition(flowId);
    FlowExecution execution;
    try {
      execution = snapshotImpl.unmarshal(def.getClassLoader());
    } catch (SnapshotUnmarshalException e) {
      throw new FlowExecutionRestorationFailureException(key, e);
    }
    flowExecutionFactory.restoreFlowExecution(execution, def, key, conversationScope, flowDefinitionLocator);
    return execution;
View Full Code Here


   * {@link ConversationParameters conversation parameters} object.
   * @param flowExecution the new flow execution
   * @return the conversation parameters object to pass to the conversation manager when the conversation is started
   */
  protected ConversationParameters createConversationParameters(FlowExecution flowExecution) {
    FlowDefinition flow = flowExecution.getDefinition();
    return new ConversationParameters(flow.getId(), flow.getCaption(), flow.getDescription());
  }
View Full Code Here

    try {
      if (logger.isDebugEnabled()) {
        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()) {
        executionRepository.putFlowExecution(flowExecution);
        return createPausedResult(flowExecution);
View Full Code Here

    FlowAssembler assembler = new FlowAssembler(new SimpleFlowBuilder(), context);
    holder = new DefaultFlowHolder(assembler);
  }

  public void testGetFlowDefinition() {
    FlowDefinition flow = holder.getFlowDefinition();
    assertEquals("flowId", flow.getId());
    assertEquals("end", flow.getStartState().getId());
  }
View Full Code Here

  }

  public void testGetFlowDefinitionWithChangesRefreshed() {
    assembler = new FlowAssembler(new ChangeDetectableFlowBuilder(), new MockFlowBuilderContext("flowId"));
    holder = new DefaultFlowHolder(assembler);
    FlowDefinition flow = holder.getFlowDefinition();
    flow = holder.getFlowDefinition();
    assertEquals("flowId", flow.getId());
    assertEquals("end", flow.getStartState().getId());
  }
View Full Code Here

public class SecurityFlowExecutionListenerTests extends TestCase {

  public void testSessionCreatingNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    FlowDefinition definition = new Flow("flow");
    listener.sessionCreating(context, definition);
  }
View Full Code Here

  protected abstract ApplicationContext initApplicationContext();


  public void testRegistryFlowLocationsPopulated() {
    FlowDefinition flow = registry.getFlowDefinition("flow");
    assertEquals("flow", flow.getId());
    assertEquals("bar", flow.getAttributes().get("foo"));
    assertEquals(new Integer(2), flow.getAttributes().get("bar"));
  }
View Full Code Here

    assertEquals("bar", flow.getAttributes().get("foo"));
    assertEquals(new Integer(2), flow.getAttributes().get("bar"));
  }

  public void testRegistryFlowLocationPatternsPopulated() {
    FlowDefinition flow1 = registry.getFlowDefinition("flow1");
    assertEquals("flow1", flow1.getId());
    FlowDefinition flow2 = registry.getFlowDefinition("flow2");
    assertEquals("flow2", flow2.getId());
  }
View Full Code Here

    FlowDefinition flow2 = registry.getFlowDefinition("flow2");
    assertEquals("flow2", flow2.getId());
  }

  public void testRegistryFlowBuildersPopulated() {
    FlowDefinition foo = registry.getFlowDefinition("foo");
    assertEquals("foo", foo.getId());
  }
View Full Code Here

    FlowDefinition foo = registry.getFlowDefinition("foo");
    assertEquals("foo", foo.getId());
  }

  public void testRegistryFlowBuildersPopulatedWithId() {
    FlowDefinition foo = registry.getFlowDefinition("foo2");
    assertEquals("foo2", foo.getId());
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.definition.FlowDefinition

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.