Skip to content

Commit 15ad3b3

Browse files
committed
fix: schedule trigger not starting for distributed workflows
1 parent cd87dd9 commit 15ad3b3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

shared.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9707,6 +9707,22 @@ func GenerateWorkflowFromParent(ctx context.Context, workflow Workflow, parentOr
97079707
}
97089708
}
97099709
}
9710+
} else if newWf.Triggers[triggerIndex].TriggerType == "SCHEDULE" {
9711+
oldID := newWf.Triggers[triggerIndex].ID
9712+
newWf.Triggers[triggerIndex].ID = uuid.NewV4().String()
9713+
9714+
newWf.Triggers[triggerIndex].ReplacementForTrigger = oldID
9715+
9716+
9717+
for branchIndex, branch := range newWf.Branches {
9718+
if branch.SourceID == oldID {
9719+
newWf.Branches[branchIndex].SourceID = newWf.Triggers[triggerIndex].ID
9720+
}
9721+
9722+
if branch.DestinationID == oldID {
9723+
newWf.Branches[branchIndex].DestinationID = newWf.Triggers[triggerIndex].ID
9724+
}
9725+
}
97109726
}
97119727
}
97129728

0 commit comments

Comments
 (0)