Skip to content

Commit 49037a4

Browse files
author
Frank Martinez
committed
fix subflow activity to handle call with no inputs
1 parent 41278c7 commit 49037a4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

activity/subflow/activity.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ func (a *SubFlowActivity) Eval(ctx activity.Context) (done bool, err error) {
6767

6868
inputs := make(map[string]*data.Attribute)
6969

70-
for name, attr := range ioMd.Input {
70+
if ioMd != nil {
71+
for name, attr := range ioMd.Input {
7172

72-
value := ctx.GetInput(name)
73-
newAttr, err := data.NewAttribute(attr.Name(), attr.Type(), value)
74-
if err != nil {
75-
return false, err
76-
}
73+
value := ctx.GetInput(name)
74+
newAttr, err := data.NewAttribute(attr.Name(), attr.Type(), value)
75+
if err != nil {
76+
return false, err
77+
}
7778

78-
inputs[name] = newAttr
79+
inputs[name] = newAttr
80+
}
7981
}
8082

8183
err = instance.StartSubFlow(ctx, flowURI, inputs)

0 commit comments

Comments
 (0)