org.springframework.webflow.execution
Interface FlowExecutionFactory

All Known Implementing Classes:
FlowExecutionImplFactory

public interface FlowExecutionFactory

An abstract factory for creating flow executions. A flow execution represents a runtime, top-level instance of a flow definition.

This factory provides encapsulation of the flow execution implementation type, as well as its construction and assembly process.

Flow execution factories are responsible for registering listeners with the constructed flow execution.

Author:
Keith Donald
See Also:
FlowExecution, FlowDefinition, FlowExecutionListener

Method Summary
 FlowExecution createFlowExecution(FlowDefinition flowDefinition)
          Create a new flow execution product for the given flow definition.
 FlowExecution restoreFlowExecution(FlowExecution flowExecution, FlowDefinition flowDefinition, FlowExecutionKey flowExecutionKey, MutableAttributeMap conversationScope, FlowDefinitionLocator subflowDefinitionLocator)
          Restore the transient state of the flow execution.
 

Method Detail

createFlowExecution

FlowExecution createFlowExecution(FlowDefinition flowDefinition)
Create a new flow execution product for the given flow definition.

Parameters:
flowDefinition - the flow definition
Returns:
the new flow execution, fully initialized and awaiting to be started

restoreFlowExecution

FlowExecution restoreFlowExecution(FlowExecution flowExecution,
                                   FlowDefinition flowDefinition,
                                   FlowExecutionKey flowExecutionKey,
                                   MutableAttributeMap conversationScope,
                                   FlowDefinitionLocator subflowDefinitionLocator)
Restore the transient state of the flow execution.

Parameters:
flowExecution - the flow execution, newly deserialized and needing restoration
flowDefinition - the root flow definition for the execution, typically not part of the serialized form
flowExecutionKey - the flow execution key, typically not part of the serialized form
conversationScope - the execution's conversation scope, which is typically not part of the serialized form since it could be shared by multiple physical flow execution copies all sharing the same logical conversation
subflowDefinitionLocator - for locating the definitions of any subflows started by the execution
Returns:
the restored flow execution