Files
StateMachineParser/tests/handleEvent.data.json
T
2022-07-13 00:32:15 -04:00

156 lines
4.3 KiB
JSON

{
"basicConditionalTransition": {
"Definition": {
"Context": {
"Target": "94854024-3a11-4acc-bdbd-5e91879455b9"
},
"States": {
"Start": {
"Pacify": {
"Condition": {
"$eq": ["$Value.RepositoryId", "$Target"]
},
"Transition": "Success"
}
}
}
},
"Inputs": [
{
"Name": "ContractStarted",
"Value": null
},
{
"Name": "Pacify",
"Value": {
"RepositoryId": "94854024-3a11-4acc-bdbd-5e91879455b9"
}
}
]
},
"conditionsActionsTransition": {
"Definition": {
"Context": {
"Number": 0,
"Outfit": "caa37b77-90e2-4118-813b-b8dcf0ce0a6c"
},
"States": {
"Start": {
"Disguised": [
{
"Condition": {
"$eq": ["$Value.RepositoryId", "$Outfit"]
},
"Actions": [
{
"$set": ["$Number", 5]
}
]
}
],
"AmbientChanged": {
"Condition": {
"$eq": ["$Number", 5]
},
"Transition": "NumberIsFive"
}
}
}
},
"Inputs": [
{
"Name": "ContractStarted",
"Value": null
},
{
"Name": "Disguised",
"Value": {
"RepositoryId": "caa37b77-90e2-4118-813b-b8dcf0ce0a6c"
}
},
{
"_comment": "why not",
"Name": "AlexaUnderMoose",
"Value": {}
},
{
"Name": "AmbientChanged",
"Value": {}
}
]
},
"immediateState": {
"Definition": {
"Context": {
"Targets": []
},
"States": {
"Start": {
"-": {
"Transition": "Success"
}
}
}
}
},
"testWithConstants": {
"Definition": {
"Context": {},
"Constants": {
"SomeRepoId": "24793fa7-7d74-4b8a-aad7-60871d2f925d"
},
"States": {
"Start": {
"Event": {
"Condition": {
"$eq": ["$Value.RepositoryId", "SomeRepoId"]
},
"Transition": "Success"
}
}
}
},
"Input": {
"Name": "Event",
"Value": {
"RepositoryId": "24793fa7-7d74-4b8a-aad7-60871d2f925d"
}
}
},
"pushUniqueAsCondition": {
"Definition": {
"Context": {
"Targets": [],
"Target": "abc123",
"Pacified": []
},
"States": {
"Start": {
"Pacify": {
"Condition": {
"$pushunique": ["Pacified", "$Value.RepositoryId"]
},
"Transition": "OnePacified"
}
},
"OnePacified": {
"Pacify": {
"Condition": {
"$not": {
"$pushunique": ["Pacified", "$Value.RepositoryId"]
}
},
"Transition": "Success"
}
}
}
},
"Input": {
"Name": "Pacify",
"Value": {
"RepositoryId": "abc123"
}
}
}
}