| 1234567891011121314151617181920 |
- {
- "name": "verify-wait-for-approval-rejects-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": "approve", "name": "Approve", "type": "wait-for-approval", "position": {"x": 0, "y": 300},
- "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": "approve", "targetInput": "data"}
- ],
- "expect": {
- "approve": {"status": "failed", "errorContains": "cannot be used inside a Loop body"}
- }
- }
|