simple_statelang_with_choice.json 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {
  2. "Name": "simpleChoiceTestStateMachine",
  3. "Comment": "带条件分支的测试状态机定义",
  4. "StartState": "FirstState",
  5. "Version": "0.0.1",
  6. "States": {
  7. "FirstState": {
  8. "Type": "ServiceTask",
  9. "ServiceName": "demoService",
  10. "ServiceMethod": "foo",
  11. "Next": "ChoiceState"
  12. },
  13. "ChoiceState":{
  14. "Type": "Choice",
  15. "Choices":[
  16. {
  17. "Expression":"[a] == 1",
  18. "Next":"SecondState"
  19. },
  20. {
  21. "Expression":"[a] == 2",
  22. "Next":"ThirdState"
  23. }
  24. ],
  25. "Default":"SecondState"
  26. },
  27. "SecondState": {
  28. "Type": "ServiceTask",
  29. "ServiceName": "demoService",
  30. "ServiceMethod": "bar"
  31. },
  32. "ThirdState": {
  33. "Type": "ServiceTask",
  34. "ServiceName": "demoService",
  35. "ServiceMethod": "foo"
  36. }
  37. }
  38. }