Skip to content

Commit a2d2dda

Browse files
committed
add trigger on event 'workflow task started'
1 parent e14c0af commit a2d2dda

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

backend/monoprocess/monoprocess.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ func (b *monoprocessBackend) CompleteWorkflowTask(
9090
if err := b.Backend.CompleteWorkflowTask(ctx, task, instance, state, executedEvents, activityEvents, timerEvents, workflowEvents); err != nil {
9191
return err
9292
}
93+
for _, e := range executedEvents {
94+
if e.Type != history.EventType_WorkflowTaskStarted {
95+
continue
96+
}
97+
if !b.notifyWorkflowWorker(ctx) {
98+
break // no reason to notify more, queue is full
99+
}
100+
}
93101
for _, e := range activityEvents {
94102
if e.Type != history.EventType_ActivityScheduled {
95103
continue

0 commit comments

Comments
 (0)