Skip to content

Commit 75d7067

Browse files
committed
[core] Ensure early reparenting of generated roles
1 parent 757ef14 commit 75d7067

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

core/workflow/aggregatorrole.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func (r *aggregatorRole) ProcessTemplates(workflowRepo *repos.Repo) (err error)
117117
r.resolveOutboundChannelTargets()
118118

119119
for _, role := range r.Roles {
120+
role.setParent(r)
120121
err = role.ProcessTemplates(workflowRepo)
121122
if err != nil {
122123
return

core/workflow/iteratorrole.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ func (i *iteratorRole) expandTemplate() (err error) {
178178
}
179179

180180
i.Roles = roles
181+
for j := 0; j < len(i.Roles); j++ {
182+
i.Roles[j].setParent(i.GetParent())
183+
}
181184
return
182185
}
183186

0 commit comments

Comments
 (0)