stop-and-error-stop-in-loop.json 1.3 KB

12345678910111213141516171819202122
  1. {
  2. "name": "verify-stop-and-error-stop-in-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: ['alpha', 'beta', 'gamma'] };"}},
  7. {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200},
  8. "config": {"inputField": "data.result.items"}},
  9. {"id": "stop", "name": "Stop", "type": "stop-and-error", "position": {"x": 0, "y": 300},
  10. "config": {"mode": "stop", "message": "stopped from inside the loop"}},
  11. {"id": "after", "name": "After", "type": "code", "position": {"x": 200, "y": 300},
  12. "config": {"code": "return { marker: 'should not run' };"}}
  13. ],
  14. "connections": [
  15. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"},
  16. {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
  17. {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "stop", "targetInput": "data"},
  18. {"sourceNodeId": "loop", "sourceOutput": "done", "targetNodeId": "after", "targetInput": "data"}
  19. ],
  20. "expectStatus": "completed",
  21. "expectMissing": ["after"]
  22. }