loop-disabled-back-edge.json 1.8 KB

123456789101112131415161718192021222324252627282930
  1. {
  2. "name": "verify-loop-disabled-back-edge",
  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: ['a', 'b', 'c'] };"}},
  7. {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200},
  8. "config": {"inputField": "data.result.items", "continueOnError": true}},
  9. {"id": "work", "name": "Work", "type": "set-fields", "position": {"x": 0, "y": 300},
  10. "config": {"mode": "only-set", "fields": [{"name": "seen", "value": "{{loop.item}}"}]}},
  11. {"id": "notify", "name": "Notify", "type": "set-fields", "position": {"x": 0, "y": 400},
  12. "disabled": true,
  13. "config": {"mode": "only-set", "fields": [{"name": "told", "value": "yes"}]}},
  14. {"id": "after", "name": "After", "type": "code", "position": {"x": 0, "y": 520},
  15. "config": {"code": "return { done: true };"}}
  16. ],
  17. "connections": [
  18. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"},
  19. {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
  20. {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "work", "targetInput": "data"},
  21. {"sourceNodeId": "work", "sourceOutput": "main", "targetNodeId": "notify", "targetInput": "data"},
  22. {"sourceNodeId": "notify", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
  23. {"sourceNodeId": "loop", "sourceOutput": "done", "targetNodeId": "after", "targetInput": "data"}
  24. ],
  25. "expectStatus": "completed",
  26. "expect": {
  27. "after": {"status": "completed"},
  28. "loop": {"status": "completed", "output": {"done": {"totalProcessed": 3}}}
  29. }
  30. }