simple_statelang_with_complex_params.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {
  2. "Name": "simpleStateMachineWithComplexParams",
  3. "Comment": "带复杂参数的测试状态机定义fastjson格式",
  4. "StartState": "FirstState",
  5. "Version": "0.0.1",
  6. "States": {
  7. "FirstState": {
  8. "Type": "ServiceTask",
  9. "ServiceName": "demoService",
  10. "ServiceMethod": "complexParameterMethod",
  11. "Next": "ChoiceState",
  12. "ParameterTypes" : ["java.lang.String", "int", "io.seata.saga.engine.mock.DemoService$People", "[Lio.seata.saga.engine.mock.DemoService$People;", "java.util.List", "java.util.Map"],
  13. "Input": [
  14. "$.[people].name",
  15. "$.[people].age",
  16. {
  17. "name": "$.[people].name",
  18. "age": "$.[people].age",
  19. "childrenArray": [
  20. {
  21. "name": "$.[people].name",
  22. "age": "$.[people].age"
  23. },
  24. {
  25. "name": "$.[people].name",
  26. "age": "$.[people].age"
  27. }
  28. ],
  29. "childrenList": [
  30. {
  31. "name": "$.[people].name",
  32. "age": "$.[people].age"
  33. },
  34. {
  35. "name": "$.[people].name",
  36. "age": "$.[people].age"
  37. }
  38. ],
  39. "childrenMap": {
  40. "lilei": {
  41. "name": "$.[people].name",
  42. "age": "$.[people].age"
  43. }
  44. }
  45. },
  46. [
  47. {
  48. "name": "$.[people].name",
  49. "age": "$.[people].age"
  50. },
  51. {
  52. "name": "$.[people].name",
  53. "age": "$.[people].age"
  54. }
  55. ],
  56. [
  57. {
  58. "@type": "io.seata.saga.engine.mock.DemoService$People",
  59. "name": "$.[people].name",
  60. "age": "$.[people].age"
  61. }
  62. ],
  63. {
  64. "lilei": {
  65. "@type": "io.seata.saga.engine.mock.DemoService$People",
  66. "name": "$.[people].name",
  67. "age": "$.[people].age"
  68. }
  69. }
  70. ],
  71. "Output": {
  72. "complexParameterMethodResult": "$.#root"
  73. }
  74. },
  75. "ChoiceState":{
  76. "Type": "Choice",
  77. "Choices":[
  78. {
  79. "Expression":"[complexParameterMethodResult].age > 0",
  80. "Next":"SecondState"
  81. },
  82. {
  83. "Expression":"[complexParameterMethodResult].age <= 0",
  84. "Next":"ThirdState"
  85. }
  86. ],
  87. "Default":"Fail"
  88. },
  89. "SecondState": {
  90. "Type": "ServiceTask",
  91. "ServiceName": "demoService",
  92. "ServiceMethod": "interfaceParameterMethod",
  93. "Input": [
  94. "$.[career]"
  95. ],
  96. "Output": {
  97. "secondStateResult": "$.#root"
  98. },
  99. "Next": "ThirdState"
  100. },
  101. "ThirdState": {
  102. "Type": "ServiceTask",
  103. "ServiceName": "demoService",
  104. "ServiceMethod": "interfaceParameterMethod",
  105. "Input": [
  106. "$.[secondStateResult]"
  107. ],
  108. "Next": "Succeed"
  109. },
  110. "Succeed": {
  111. "Type":"Succeed"
  112. },
  113. "Fail": {
  114. "Type":"Fail",
  115. "ErrorCode": "NOT_FOUND",
  116. "Message": "not found"
  117. }
  118. }
  119. }