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