single-node-target-loop-iteration-out-of-range.json 1.3 KB

1234567891011121314151617181920212223242526
  1. {
  2. "name": "verify-single-node-target-loop-iteration-out-of-range",
  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"}},
  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. ],
  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": "work", "targetInput": "data"},
  16. {"sourceNodeId": "work", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"}
  17. ],
  18. "trigger": {"_targetNodeId": "work", "_targetLoopIteration": 7},
  19. "expectExecutionAbsent": ["work"],
  20. "expectExecution": {
  21. "status": "failed",
  22. "singleNodeTarget": "work",
  23. "singleNodeIteration": 7
  24. },
  25. "expectExecutionError": "Requested loop iteration 7"
  26. }