55
newWorkflowEventsSeq []*persistence.WorkflowEvents,
56
isWorkflow bool,
58
>
59
>
engine, err := t.shard.GetEngine(ctx)
60
>
if err != nil {
61
return 0, err
62
}
63
65
>
ctx,
66
>
t.shard,
67
>
newWorkflowFailoverVersion,
68
>
&persistence.CreateWorkflowExecutionRequest{
69
>
ShardID: t.shard.GetShardID(),
70
>
// RangeID , this is set by shard context
71
>
Mode: createMode,
72
>
ArchetypeID: archetypeID,
73
>
NewWorkflowSnapshot: *newWorkflowSnapshot,
74
>
NewWorkflowEvents: newWorkflowEventsSeq,
75
>
},
76
>
isWorkflow,
77
>
)
78
>
if persistence.OperationPossiblySucceeded(err) {
79
>
NotifyOnExecutionSnapshot(engine, newWorkflowSnapshot)
80
>
}
81
>
if err != nil {
82
>
return 0, err
83
>
}
84
85
if err := NotifyNewHistorySnapshotEvent(engine, newWorkflowSnapshot); err != nil {