104
currentWorkflowEventsSeq []*persistence.WorkflowEvents,
105
isWorkflow bool,
107
>
108
>
engine, err := t.shard.GetEngine(ctx)
109
>
if err != nil {
110
return 0, 0, 0, err
111
}
112
114
>
ctx,
115
>
t.shard,
116
>
resetWorkflowFailoverVersion,
117
>
newWorkflowFailoverVersion,
118
>
currentWorkflowFailoverVersion,
119
>
&persistence.ConflictResolveWorkflowExecutionRequest{
120
>
ShardID: t.shard.GetShardID(),
121
>
// RangeID , this is set by shard context
122
>
Mode: conflictResolveMode,
123
>
ArchetypeID: archetypeID,
124
>
ResetWorkflowSnapshot: *resetWorkflowSnapshot,
125
>
ResetWorkflowEvents: resetWorkflowEventsSeq,
126
>
NewWorkflowSnapshot: newWorkflowSnapshot,
127
>
NewWorkflowEvents: newWorkflowEventsSeq,
128
>
CurrentWorkflowMutation: currentWorkflowMutation,
129
>
CurrentWorkflowEvents: currentWorkflowEventsSeq,
130
>
},
131
>
isWorkflow,
132
>
)
133
>
if persistence.OperationPossiblySucceeded(err) {
134
>
NotifyOnExecutionSnapshot(engine, resetWorkflowSnapshot)
135
>
NotifyOnExecutionSnapshot(engine, newWorkflowSnapshot)
136
>
NotifyOnExecutionMutation(engine, currentWorkflowMutation)
137
>
}
138
>
if err != nil {
139
return 0, 0, 0, err
140
}