simple_statelang_param_assignment.json 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {
  2. "Name": "simpleInputAssignmentStateMachine",
  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. "Input": [
  13. {
  14. "fooInput": "$.[a]",
  15. "fooBusinessKey": "$Sequence.BUSINESS_KEY|SIMPLE"
  16. }
  17. ],
  18. "Output": {
  19. "fooResult": "$.#root"
  20. }
  21. },
  22. "ChoiceState":{
  23. "Type": "Choice",
  24. "Choices":[
  25. {
  26. "Expression":"[a] == 1",
  27. "Next":"SecondState"
  28. },
  29. {
  30. "Expression":"[a] == 2",
  31. "Next":"ThirdState"
  32. }
  33. ],
  34. "Default":"Fail"
  35. },
  36. "SecondState": {
  37. "Type": "ServiceTask",
  38. "ServiceName": "demoService",
  39. "ServiceMethod": "bar",
  40. "Input": [
  41. {
  42. "barInput": "$.[fooResult]"
  43. }
  44. ],
  45. "Output": {
  46. "barResult": "$.#root"
  47. },
  48. "Next": "Succeed"
  49. },
  50. "ThirdState": {
  51. "Type": "ServiceTask",
  52. "ServiceName": "demoService",
  53. "ServiceMethod": "foo",
  54. "Input": [
  55. {
  56. "fooInput": "[fooResult][a].list[0]"
  57. }
  58. ],
  59. "Output": {
  60. "fooResult": "$.#root"
  61. },
  62. "listener":"",
  63. "Next": "Succeed"
  64. },
  65. "Succeed": {
  66. "Type":"Succeed"
  67. },
  68. "Fail": {
  69. "Type":"Fail",
  70. "ErrorCode": "NOT_FOUND",
  71. "Message": "not found"
  72. }
  73. }
  74. }