Package org.springframework.webflow.definition

Examples of org.springframework.webflow.definition.FlowDefinition


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

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


    FlowLocation[] flowLocations = new FlowLocation[] { location1, location2 };
    factoryBean.setFlowBuilderServices(TestFlowBuilderServicesFactory.getServices());
    factoryBean.setFlowLocations(flowLocations);
    factoryBean.afterPropertiesSet();
    FlowDefinitionRegistry registry = factoryBean.getObject();
    FlowDefinition def = registry.getFlowDefinition("flow1");
    assertNotNull(def);
    assertEquals("flow1", def.getId());
    assertEquals("bar", def.getAttributes().get("foo"));
    assertEquals(new Integer(2), def.getAttributes().getInteger("bar"));
    def = registry.getFlowDefinition("flow2");
    assertNotNull(def);
    assertEquals("flow2", def.getId());
  }
View Full Code Here

    FlowLocation[] flowLocations = new FlowLocation[] { location1 };
    factoryBean.setFlowBuilderServices(TestFlowBuilderServicesFactory.getServices());
    factoryBean.setFlowLocations(flowLocations);
    factoryBean.afterPropertiesSet();
    FlowDefinitionRegistry registry = factoryBean.getObject();
    FlowDefinition def = registry.getFlowDefinition("flow");
    assertNotNull(def);
    assertEquals("flow", def.getId());
    assertTrue(def.getAttributes().isEmpty());
  }
View Full Code Here

    FlowLocation[] flowLocations = new FlowLocation[] { location1 };
    factoryBean.setFlowLocations(flowLocations);
    factoryBean.setFlowBuilderServices(TestFlowBuilderServicesFactory.getServices());
    factoryBean.afterPropertiesSet();
    FlowDefinitionRegistry registry = factoryBean.getObject();
    FlowDefinition def = registry.getFlowDefinition("flow");
    assertNotNull(def);
    assertEquals("flow", def.getId());
    assertTrue(def.getAttributes().isEmpty());
  }
View Full Code Here

  public FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, String flowId, FlowExecutionKey key,
      MutableAttributeMap<Object> conversationScope, FlowExecutionKeyFactory keyFactory)
      throws FlowExecutionRestorationFailureException {
    SimpleFlowExecutionSnapshot snapshotImpl = (SimpleFlowExecutionSnapshot) snapshot;
    FlowDefinition def = flowDefinitionLocator.getFlowDefinition(flowId);
    FlowExecution execution = snapshotImpl.getFlowExecution();
    flowExecutionFactory.restoreFlowExecution(execution, def, key, conversationScope, flowDefinitionLocator);
    return execution;
  }
View Full Code Here

  public FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, String flowId, FlowExecutionKey key,
      MutableAttributeMap<Object> 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

   * 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()) {
        FlowExecutionLock lock = executionRepository.getLock(flowExecution.getKey());
        lock.lock();
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.