wait-for-approval-loop.json 1.0 KB

1234567891011121314151617181920
  1. {
  2. "name": "verify-wait-for-approval-rejects-loop",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "items", "name": "Items", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return { items: [1, 2] };"}},
  7. {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200},
  8. "config": {"inputField": "data.result.items"}},
  9. {"id": "approve", "name": "Approve", "type": "wait-for-approval", "position": {"x": 0, "y": 300},
  10. "config": {"reason": "Should never pause", "expiresIn": 1}}
  11. ],
  12. "connections": [
  13. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"},
  14. {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
  15. {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "approve", "targetInput": "data"}
  16. ],
  17. "expect": {
  18. "approve": {"status": "failed", "errorContains": "cannot be used inside a Loop body"}
  19. }
  20. }