* Validates that loops and parallels have proper internal structure. * Throws an error if a loop/parallel has no blocks inside or no connections from start.
(dag: DAG)
| 135 | * Throws an error if a loop/parallel has no blocks inside or no connections from start. |
| 136 | */ |
| 137 | private validateSubflowStructure(dag: DAG): void { |
| 138 | for (const [id, config] of dag.loopConfigs) { |
| 139 | this.validateSubflow(dag, id, config.nodes, 'Loop') |
| 140 | } |
| 141 | for (const [id, config] of dag.parallelConfigs) { |
| 142 | this.validateSubflow(dag, id, config.nodes, 'Parallel') |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | private validateSubflow( |
| 147 | dag: DAG, |