Interface FlowExecutionSnapshotFactory
- All Known Implementing Classes:
SerializedFlowExecutionSnapshotFactory,SimpleFlowExecutionSnapshotFactory
public interface FlowExecutionSnapshotFactory
A factory for creating different
FlowExecutionSnapshot implementations.- Author:
- Keith Donald, Erwin Vervaet
-
Method Summary
Modifier and TypeMethodDescriptioncreateSnapshot(FlowExecution flowExecution) Takes a snapshot of the flow execution.restoreExecution(FlowExecutionSnapshot snapshot, String flowId, FlowExecutionKey key, MutableAttributeMap<Object> conversationScope, FlowExecutionKeyFactory keyFactory) Restores a flow execution from a previously taken snapshot.
-
Method Details
-
createSnapshot
Takes a snapshot of the flow execution.- Parameters:
flowExecution- the flow execution- Returns:
- the new snapshot
- Throws:
SnapshotCreationException- if the snapshot could not be created
-
restoreExecution
FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, String flowId, FlowExecutionKey key, MutableAttributeMap<Object> conversationScope, FlowExecutionKeyFactory keyFactory) throws FlowExecutionRestorationFailureException Restores a flow execution from a previously taken snapshot.- Parameters:
snapshot- the previously taken snapshotflowId- the id of the root flow definitionkey- the flow execution keyconversationScope- conversation scopekeyFactory- factory for creating new snapshot keys- Returns:
- the restored flow execution
- Throws:
FlowExecutionRestorationFailureException- if flow execution restoration fails
-