509
510
for _, childWorkflowInfo := range pendingChildWorkflowInfos {
511
>
// Skip task generation if this child workflow has already been started.
task_refresher.go
512
>
// This is an optimization to avoid generating duplicate tasks.
513
>
// However, if this child workflow was not in the previous pending child IDs,
514
>
// we still need to generate tasks even if it's started, because this means
515
>
// the child workflow was just added to the mutable state.
516
>
if _, ok := previousPendingChildIds[childWorkflowInfo.InitiatedEventId]; ok {
517
if childWorkflowInfo.StartedEventId != common.EmptyEventID {
518
continue