tc_break_serial.json 895 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. "version": "3.16",
  3. "name": "TC Break Serial: Exit Loop on item==3",
  4. "registry": {
  5. "params": [],
  6. "vars": ["$items([INT])", "$results([INT])"]
  7. },
  8. "steps": [
  9. {
  10. "id": "Set_Items",
  11. "target": "$items",
  12. "value": "[1, 2, 3, 4, 5]",
  13. "next": "Loop_Items"
  14. },
  15. {
  16. "id": "Loop_Items",
  17. "mode": "serial",
  18. "source": "=$items",
  19. "children": ["Branch_Check"],
  20. "next": "Stop_End"
  21. },
  22. {
  23. "id": "Branch_Check",
  24. "cases": [
  25. ["=_item == 3", "Set_BreakHere"],
  26. ["ELSE", "Set_Collect"]
  27. ],
  28. "next": "RETURN"
  29. },
  30. {
  31. "id": "Set_BreakHere",
  32. "target": "$results[_index]",
  33. "value": "=_item",
  34. "next": "BREAK"
  35. },
  36. {
  37. "id": "Set_Collect",
  38. "target": "$results[_index]",
  39. "value": "=_item",
  40. "next": "RETURN"
  41. },
  42. { "id": "Stop_End" }
  43. ]
  44. }