| 1507 | } |
| 1508 | |
| 1509 | const checkForMultipleStartNodes = (startingNodeIds: string[], isRecursive: boolean, nodes: IReactFlowNode[]) => { |
| 1510 | // For non-recursive, loop through and check if each starting node is inside an iteration node, if yes, delete it |
| 1511 | const clonedStartingNodeIds = [...startingNodeIds] |
| 1512 | for (const nodeId of clonedStartingNodeIds) { |
| 1513 | const node = nodes.find((node) => node.id === nodeId) |
| 1514 | if (node?.extent === 'parent' && !isRecursive) { |
| 1515 | startingNodeIds.splice(startingNodeIds.indexOf(nodeId), 1) |
| 1516 | } |
| 1517 | } |
| 1518 | |
| 1519 | if (!isRecursive && startingNodeIds.length > 1) { |
| 1520 | throw new Error('Multiple starting nodes are not allowed') |
| 1521 | } |
| 1522 | } |
| 1523 | |
| 1524 | const parseFormStringToJson = (formString: string): Record<string, string> => { |
| 1525 | const result: Record<string, string> = {} |