Skip to content

Commit 8f24888

Browse files
committed
Fix copy/paste bug
1 parent 9397d6a commit 8f24888

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

service/history/workflow/transaction_impl.go

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,28 +193,23 @@ func (t *TransactionImpl) UpdateWorkflowExecution(
193193
NotifyWorkflowMutationTasks(engine, currentWorkflowMutation)
194194
NotifyWorkflowSnapshotTasks(engine, newWorkflowSnapshot)
195195

196-
if persistence.OperationPossiblySucceeded(err) {
197-
NotifyWorkflowMutationTasks(engine, currentWorkflowMutation)
198-
NotifyWorkflowSnapshotTasks(engine, newWorkflowSnapshot)
199-
200-
// Notify for current workflow if it has CHASM updates
201-
if len(currentWorkflowMutation.UpsertChasmNodes) > 0 ||
202-
len(currentWorkflowMutation.DeleteChasmNodes) > 0 {
203-
engine.NotifyChasmExecution(chasm.EntityKey{
204-
NamespaceID: currentWorkflowMutation.ExecutionInfo.NamespaceId,
205-
BusinessID: currentWorkflowMutation.ExecutionInfo.WorkflowId,
206-
EntityID: currentWorkflowMutation.ExecutionState.RunId,
207-
}, nil)
208-
}
196+
// Notify for current workflow if it has CHASM updates
197+
if len(currentWorkflowMutation.UpsertChasmNodes) > 0 ||
198+
len(currentWorkflowMutation.DeleteChasmNodes) > 0 {
199+
engine.NotifyChasmExecution(chasm.EntityKey{
200+
NamespaceID: currentWorkflowMutation.ExecutionInfo.NamespaceId,
201+
BusinessID: currentWorkflowMutation.ExecutionInfo.WorkflowId,
202+
EntityID: currentWorkflowMutation.ExecutionState.RunId,
203+
}, nil)
204+
}
209205

210-
// Notify for new workflow if it has CHASM nodes
211-
if newWorkflowSnapshot != nil && len(newWorkflowSnapshot.ChasmNodes) > 0 {
212-
engine.NotifyChasmExecution(chasm.EntityKey{
213-
NamespaceID: newWorkflowSnapshot.ExecutionInfo.NamespaceId,
214-
BusinessID: newWorkflowSnapshot.ExecutionInfo.WorkflowId,
215-
EntityID: newWorkflowSnapshot.ExecutionState.RunId,
216-
}, nil)
217-
}
206+
// Notify for new workflow if it has CHASM nodes
207+
if newWorkflowSnapshot != nil && len(newWorkflowSnapshot.ChasmNodes) > 0 {
208+
engine.NotifyChasmExecution(chasm.EntityKey{
209+
NamespaceID: newWorkflowSnapshot.ExecutionInfo.NamespaceId,
210+
BusinessID: newWorkflowSnapshot.ExecutionInfo.WorkflowId,
211+
EntityID: newWorkflowSnapshot.ExecutionState.RunId,
212+
}, nil)
218213
}
219214
}
220215
if err != nil {

0 commit comments

Comments
 (0)