From c6f1149686da469dbe8f136fa925999a3e906f56 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Mon, 15 Feb 2021 19:22:54 +0100 Subject: [PATCH] Make sure have exactly 2 outbound paths in iterator --- automation/service/workflow_converter.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/automation/service/workflow_converter.go b/automation/service/workflow_converter.go index 563fcbc86..7e7f8597f 100644 --- a/automation/service/workflow_converter.go +++ b/automation/service/workflow_converter.go @@ -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)