test02_set_and_branch.json 873 B

1234567891011121314151617181920212223242526272829
  1. {
  2. "version": "3.15",
  3. "name": "Test02: Set + Branch + Conditional Logic",
  4. "registry": {
  5. "params": ["score(INT)"],
  6. "vars": ["$level(STRING)", "$result(STRING)"]
  7. },
  8. "steps": [
  9. {
  10. "id": "Branch_ScoreLevel",
  11. "cases": [
  12. ["=score >= 90", "Set_Excellent"],
  13. ["=score >= 60", "Set_Pass"],
  14. ["ELSE", "Set_Fail"]
  15. ],
  16. "next": "Set_Summary"
  17. },
  18. { "id": "Set_Excellent", "target": "$level", "value": "\"excellent\"", "next": "RETURN" },
  19. { "id": "Set_Pass", "target": "$level", "value": "\"pass\"", "next": "RETURN" },
  20. { "id": "Set_Fail", "target": "$level", "value": "\"fail\"", "next": "RETURN" },
  21. {
  22. "id": "Set_Summary",
  23. "target": "$result",
  24. "value": "=\"Score: \" + score + \", Level: \" + $level",
  25. "next": "Stop_End"
  26. },
  27. { "id": "Stop_End" }
  28. ]
  29. }