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:
-
Method Summary
Modifier and TypeMethodDescriptioncreateFlowExecution
(FlowDefinition flowDefinition) Create a new flow execution product for the given flow definition.restoreFlowExecution
(FlowExecution flowExecution, FlowDefinition flowDefinition, FlowExecutionKey flowExecutionKey, MutableAttributeMap<Object> conversationScope, FlowDefinitionLocator subflowDefinitionLocator) Restore the transient state of the flow execution.
-
Method Details
-
createFlowExecution
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<Object> conversationScope, FlowDefinitionLocator subflowDefinitionLocator) Restore the transient state of the flow execution.- Parameters:
flowExecution
- the flow execution, newly deserialized and needing restorationflowDefinition
- the root flow definition for the execution, typically not part of the serialized formflowExecutionKey
- the flow execution key, typically not part of the serialized formconversationScope
- 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 conversationsubflowDefinitionLocator
- for locating the definitions of any subflows started by the execution- Returns:
- the restored flow execution
-