public class SimpleFlowExecutionSnapshotFactory extends java.lang.Object implements FlowExecutionSnapshotFactory
flow execution
instance.
Note: this class is generally only suitable for use with a repository that has maxSnapshots set to 1, since no actual
copies of the execution data are made by this factory. This class exists to support the use case where taking copies
of flow execution state is not needed.Constructor and Description |
---|
SimpleFlowExecutionSnapshotFactory(FlowExecutionFactory flowExecutionFactory,
FlowDefinitionLocator flowDefinitionLocator)
Creates a new simple flow execution snapshot factory
|
Modifier and Type | Method and Description |
---|---|
FlowExecutionSnapshot |
createSnapshot(FlowExecution flowExecution)
Takes a snapshot of the flow execution.
|
FlowExecution |
restoreExecution(FlowExecutionSnapshot snapshot,
java.lang.String flowId,
FlowExecutionKey key,
MutableAttributeMap<java.lang.Object> conversationScope,
FlowExecutionKeyFactory keyFactory)
Restores a flow execution from a previously taken snapshot.
|
public SimpleFlowExecutionSnapshotFactory(FlowExecutionFactory flowExecutionFactory, FlowDefinitionLocator flowDefinitionLocator)
flowDefinitionLocator
- the flow definition locatorflowExecutionFactory
- the flow execution factorypublic FlowExecutionSnapshot createSnapshot(FlowExecution flowExecution) throws SnapshotCreationException
FlowExecutionSnapshotFactory
createSnapshot
in interface FlowExecutionSnapshotFactory
flowExecution
- the flow executionSnapshotCreationException
- if the snapshot could not be createdpublic FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, java.lang.String flowId, FlowExecutionKey key, MutableAttributeMap<java.lang.Object> conversationScope, FlowExecutionKeyFactory keyFactory) throws FlowExecutionRestorationFailureException
FlowExecutionSnapshotFactory
restoreExecution
in interface FlowExecutionSnapshotFactory
snapshot
- the previously taken snapshotflowId
- the id of the root flow definitionkey
- the flow execution keyconversationScope
- conversation scopekeyFactory
- factory for creating new snapshot keysFlowExecutionRestorationFailureException
- if flow execution restoration fails