simple_statemachine_with_layout.json 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. {
  2. "nodes": [
  3. {
  4. "type": "node",
  5. "size": "72*72",
  6. "shape": "flow-circle",
  7. "color": "#FA8C16",
  8. "label": "Start",
  9. "stateId": "Start",
  10. "stateType": "Start",
  11. "stateProps": {
  12. "StateMachine": {
  13. "Name": "simpleStateMachineWithCompensationAndSubMachine_layout",
  14. "Comment": "带补偿定义和调用子状态机",
  15. "Version": "0.0.1"
  16. }
  17. },
  18. "x": 199.875,
  19. "y": 95,
  20. "id": "e2d86441"
  21. },
  22. {
  23. "type": "node",
  24. "size": "110*48",
  25. "shape": "flow-rect",
  26. "color": "#1890FF",
  27. "label": "FirstState",
  28. "stateId": "FirstState",
  29. "stateType": "ServiceTask",
  30. "stateProps": {
  31. "ServiceName": "demoService",
  32. "ServiceMethod": "foo",
  33. "Input": [
  34. {
  35. "fooInput": "$.[a]"
  36. }
  37. ],
  38. "Output": {
  39. "fooResult": "$.#root"
  40. }
  41. },
  42. "x": 199.875,
  43. "y": 213,
  44. "id": "6111bf54"
  45. },
  46. {
  47. "type": "node",
  48. "size": "80*72",
  49. "shape": "flow-rhombus",
  50. "color": "#13C2C2",
  51. "label": "ChoiceState",
  52. "stateId": "ChoiceState",
  53. "stateType": "Choice",
  54. "x": 199.875,
  55. "y": 341.5,
  56. "id": "5610fa37"
  57. },
  58. {
  59. "type": "node",
  60. "size": "110*48",
  61. "shape": "flow-rect",
  62. "color": "#1890FF",
  63. "label": "SecondState",
  64. "stateId": "SecondState",
  65. "stateType": "ServiceTask",
  66. "stateProps": {
  67. "ServiceName": "demoService",
  68. "ServiceMethod": "bar",
  69. "Input": [
  70. {
  71. "barInput": "$.[fooResult]",
  72. "throwException": "$.[barThrowException]"
  73. }
  74. ],
  75. "Output": {
  76. "barResult": "$.#root"
  77. },
  78. "Status": {
  79. "#root != null": "SU",
  80. "#root == null": "FA",
  81. "$Exception{io.seata.saga.engine.exception.EngineExecutionException}": "UN"
  82. }
  83. },
  84. "x": 199.375,
  85. "y": 468,
  86. "id": "af5591f9"
  87. },
  88. {
  89. "type": "node",
  90. "size": "72*72",
  91. "shape": "flow-circle",
  92. "color": "#05A465",
  93. "label": "Succeed",
  94. "stateId": "Succeed",
  95. "stateType": "Succeed",
  96. "x": 199.375,
  97. "y": 609,
  98. "id": "2fd4c8de"
  99. },
  100. {
  101. "type": "node",
  102. "size": "110*48",
  103. "shape": "flow-rect",
  104. "color": "#FA8C16",
  105. "label": "SubStateMachine",
  106. "stateId": "CallSubStateMachine",
  107. "stateType": "SubStateMachine",
  108. "stateProps": {
  109. "StateMachineName": "simpleCompensationStateMachine",
  110. "Input": [
  111. {
  112. "a": "$.1",
  113. "barThrowException": "$.[barThrowException]",
  114. "fooThrowException": "$.[fooThrowException]",
  115. "compensateFooThrowException": "$.[compensateFooThrowException]"
  116. }
  117. ],
  118. "Output": {
  119. "fooResult": "$.#root"
  120. }
  121. },
  122. "x": 55.875,
  123. "y": 467,
  124. "id": "04ea55a5"
  125. },
  126. {
  127. "type": "node",
  128. "size": "110*48",
  129. "shape": "flow-capsule",
  130. "color": "#722ED1",
  131. "label": "CompenFirstState",
  132. "stateId": "CompensateFirstState",
  133. "stateType": "Compensation",
  134. "stateProps": {
  135. "ServiceName": "demoService",
  136. "ServiceMethod": "compensateFoo",
  137. "Input": [
  138. {
  139. "compensateFooInput": "$.[fooResult]"
  140. }
  141. ]
  142. },
  143. "x": 68.875,
  144. "y": 126,
  145. "id": "6a09a5c2"
  146. },
  147. {
  148. "type": "node",
  149. "size": "39*39",
  150. "shape": "flow-circle",
  151. "color": "red",
  152. "label": "Catch",
  153. "stateId": "Catch",
  154. "stateType": "Catch",
  155. "x": 257.875,
  156. "y": 492,
  157. "id": "e28af1c2"
  158. },
  159. {
  160. "type": "node",
  161. "size": "110*48",
  162. "shape": "flow-capsule",
  163. "color": "red",
  164. "label": "Compensation\nTrigger",
  165. "stateId": "CompensationTrigger",
  166. "stateType": "CompensationTrigger",
  167. "x": 366.875,
  168. "y": 491.5,
  169. "id": "e32417a0"
  170. },
  171. {
  172. "type": "node",
  173. "size": "72*72",
  174. "shape": "flow-circle",
  175. "color": "red",
  176. "label": "Fail",
  177. "stateId": "Fail",
  178. "stateType": "Fail",
  179. "stateProps": {
  180. "ErrorCode": "NOT_FOUND",
  181. "Message": "not found"
  182. },
  183. "x": 513.375,
  184. "y": 491.5,
  185. "id": "d21d24c9"
  186. }
  187. ],
  188. "edges": [
  189. {
  190. "source": "e2d86441",
  191. "sourceAnchor": 2,
  192. "target": "6111bf54",
  193. "targetAnchor": 0,
  194. "id": "51f30b96"
  195. },
  196. {
  197. "source": "6111bf54",
  198. "sourceAnchor": 2,
  199. "target": "5610fa37",
  200. "targetAnchor": 0,
  201. "id": "8c3029b1"
  202. },
  203. {
  204. "source": "5610fa37",
  205. "sourceAnchor": 2,
  206. "target": "af5591f9",
  207. "targetAnchor": 0,
  208. "id": "a9e7d5b4",
  209. "stateProps": {
  210. "Expression": "[a] == 1",
  211. "Default": false
  212. },
  213. "label": "",
  214. "shape": "flow-smooth"
  215. },
  216. {
  217. "source": "af5591f9",
  218. "sourceAnchor": 2,
  219. "target": "2fd4c8de",
  220. "targetAnchor": 0,
  221. "id": "61f34a49"
  222. },
  223. {
  224. "source": "6111bf54",
  225. "sourceAnchor": 3,
  226. "target": "6a09a5c2",
  227. "targetAnchor": 2,
  228. "id": "553384ab",
  229. "style": {
  230. "lineDash": "4"
  231. }
  232. },
  233. {
  234. "source": "5610fa37",
  235. "sourceAnchor": 3,
  236. "target": "04ea55a5",
  237. "targetAnchor": 0,
  238. "id": "2ee91c33",
  239. "stateProps": {
  240. "Expression": "[a] == 2",
  241. "Default": false
  242. },
  243. "label": "",
  244. "shape": "flow-smooth"
  245. },
  246. {
  247. "source": "e28af1c2",
  248. "sourceAnchor": 1,
  249. "target": "e32417a0",
  250. "targetAnchor": 3,
  251. "id": "d854a4d0",
  252. "stateProps": {
  253. "Exceptions": [
  254. "io.seata.common.exception.FrameworkException"
  255. ]
  256. },
  257. "label": "",
  258. "shape": "flow-smooth"
  259. },
  260. {
  261. "source": "04ea55a5",
  262. "sourceAnchor": 2,
  263. "target": "2fd4c8de",
  264. "targetAnchor": 3,
  265. "id": "28734ad2"
  266. },
  267. {
  268. "source": "5610fa37",
  269. "sourceAnchor": 1,
  270. "target": "d21d24c9",
  271. "targetAnchor": 0,
  272. "id": "7c7595c0",
  273. "stateProps": {
  274. "Expression": "",
  275. "Default": true
  276. },
  277. "label": "",
  278. "shape": "flow-smooth"
  279. },
  280. {
  281. "source": "e32417a0",
  282. "sourceAnchor": 1,
  283. "target": "d21d24c9",
  284. "targetAnchor": 3,
  285. "id": "16d809ce"
  286. }
  287. ]
  288. }