172
newWorkflowEventsSeq []*persistence.WorkflowEvents,
173
isWorkflow bool,
175
>
176
>
engine, err := t.shard.GetEngine(ctx)
177
>
if err != nil {
178
return 0, 0, err
179
}
181
>
ctx,
182
>
t.shard,
183
>
currentWorkflowFailoverVersion,
184
>
newWorkflowFailoverVersion,
185
>
&persistence.UpdateWorkflowExecutionRequest{
186
>
ShardID: t.shard.GetShardID(),
187
>
// RangeID , this is set by shard context
188
>
Mode: updateMode,
189
>
ArchetypeID: archetypeID,
190
>
UpdateWorkflowMutation: *currentWorkflowMutation,
191
>
UpdateWorkflowEvents: currentWorkflowEventsSeq,
192
>
NewWorkflowSnapshot: newWorkflowSnapshot,
193
>
NewWorkflowEvents: newWorkflowEventsSeq,
194
>
},
195
>
isWorkflow,
196
>
)
197
>
if persistence.OperationPossiblySucceeded(err) {
198
NotifyOnExecutionMutation(engine, currentWorkflowMutation)
199
NotifyOnExecutionSnapshot(engine, newWorkflowSnapshot)
200
}
202
return 0, 0, err
203
}