| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- {
- "Name": "simpleStateMachineWithComplexParams",
- "Comment": "带复杂参数的测试状态机定义fastjson格式",
- "StartState": "FirstState",
- "Version": "0.0.1",
- "States": {
- "FirstState": {
- "Type": "ServiceTask",
- "ServiceName": "demoService",
- "ServiceMethod": "complexParameterMethod",
- "Next": "ChoiceState",
- "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"],
- "Input": [
- "$.[people].name",
- "$.[people].age",
- {
- "name": "$.[people].name",
- "age": "$.[people].age",
- "childrenArray": [
- {
- "name": "$.[people].name",
- "age": "$.[people].age"
- },
- {
- "name": "$.[people].name",
- "age": "$.[people].age"
- }
- ],
- "childrenList": [
- {
- "name": "$.[people].name",
- "age": "$.[people].age"
- },
- {
- "name": "$.[people].name",
- "age": "$.[people].age"
- }
- ],
- "childrenMap": {
- "lilei": {
- "name": "$.[people].name",
- "age": "$.[people].age"
- }
- }
- },
- [
- {
- "name": "$.[people].name",
- "age": "$.[people].age"
- },
- {
- "name": "$.[people].name",
- "age": "$.[people].age"
- }
- ],
- [
- {
- "@type": "io.seata.saga.engine.mock.DemoService$People",
- "name": "$.[people].name",
- "age": "$.[people].age"
- }
- ],
- {
- "lilei": {
- "@type": "io.seata.saga.engine.mock.DemoService$People",
- "name": "$.[people].name",
- "age": "$.[people].age"
- }
- }
- ],
- "Output": {
- "complexParameterMethodResult": "$.#root"
- }
- },
- "ChoiceState":{
- "Type": "Choice",
- "Choices":[
- {
- "Expression":"[complexParameterMethodResult].age > 0",
- "Next":"SecondState"
- },
- {
- "Expression":"[complexParameterMethodResult].age <= 0",
- "Next":"ThirdState"
- }
- ],
- "Default":"Fail"
- },
- "SecondState": {
- "Type": "ServiceTask",
- "ServiceName": "demoService",
- "ServiceMethod": "interfaceParameterMethod",
- "Input": [
- "$.[career]"
- ],
- "Output": {
- "secondStateResult": "$.#root"
- },
- "Next": "ThirdState"
- },
- "ThirdState": {
- "Type": "ServiceTask",
- "ServiceName": "demoService",
- "ServiceMethod": "interfaceParameterMethod",
- "Input": [
- "$.[secondStateResult]"
- ],
- "Next": "Succeed"
- },
- "Succeed": {
- "Type":"Succeed"
- },
- "Fail": {
- "Type":"Fail",
- "ErrorCode": "NOT_FOUND",
- "Message": "not found"
- }
- }
- }
|