{ "name": "verify-wait-for-approval-rejects-chained-loop", "nodes": [ {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}}, {"id": "items", "name": "Items", "type": "code", "position": {"x": 0, "y": 100}, "config": {"code": "return { items: [1, 2] };"}}, {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200}, "config": {"inputField": "data.result.items"}}, {"id": "pass", "name": "Pass Through", "type": "code", "position": {"x": 0, "y": 300}, "config": {"code": "return { item: input.item };"}}, {"id": "approve", "name": "Approve", "type": "wait-for-approval", "position": {"x": 0, "y": 400}, "config": {"reason": "Should never pause", "expiresIn": 1}} ], "connections": [ {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"}, {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"}, {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "pass", "targetInput": "data"}, {"sourceNodeId": "pass", "sourceOutput": "main", "targetNodeId": "approve", "targetInput": "data"} ], "expect": { "approve": {"status": "failed", "errorContains": "cannot be used inside a Loop body"} } }