Skip to content

Commit

Permalink
fix subflow activity to handle call with no inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Martinez committed Jun 26, 2018
1 parent 41278c7 commit 49037a4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions activity/subflow/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ func (a *SubFlowActivity) Eval(ctx activity.Context) (done bool, err error) {

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

for name, attr := range ioMd.Input {
if ioMd != nil {
for name, attr := range ioMd.Input {

value := ctx.GetInput(name)
newAttr, err := data.NewAttribute(attr.Name(), attr.Type(), value)
if err != nil {
return false, err
}
value := ctx.GetInput(name)
newAttr, err := data.NewAttribute(attr.Name(), attr.Type(), value)
if err != nil {
return false, err
}

inputs[name] = newAttr
inputs[name] = newAttr
}
}

err = instance.StartSubFlow(ctx, flowURI, inputs)
Expand Down

0 comments on commit 49037a4

Please sign in to comment.