Make sure have exactly 2 outbound paths in iterator

This commit is contained in:
Denis Arh
2021-03-12 13:12:07 +01:00
parent 800b246926
commit c6f1149686
+4
View File
@@ -345,6 +345,10 @@ func (svc workflowConverter) convFunctionStep(g *wfexec.Graph, s *types.Workflow
}
if isIterator {
if len(out) != 2 {
return nil, fmt.Errorf("expecting exactly 2 outbound paths for iterator")
}
var (
next = g.StepByID(out[0].ChildID)
exit = g.StepByID(out[1].ChildID)