mirror of
https://github.com/thepeacockproject/StateMachineParser.git
synced 2026-11-22 05:03:05 -10:00
257 lines
7.2 KiB
JSON
257 lines
7.2 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"
|
|
}
|
|
}
|
|
},
|
|
"actionWithConstants": {
|
|
"Definition": {
|
|
"Context": {
|
|
"Variable": 0
|
|
},
|
|
"Constants": {
|
|
"ValueToAdd": 500
|
|
},
|
|
"States": {
|
|
"Start": {
|
|
"Event": {
|
|
"Actions": {
|
|
"$inc": ["Variable", "$.ValueToAdd"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Input": {
|
|
"Name": "Event",
|
|
"Value": {}
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"testWithSameName": {
|
|
"Definition": {
|
|
"Context": {
|
|
"Painting_A": false,
|
|
"Painting_B": false
|
|
},
|
|
"States": {
|
|
"Start": {
|
|
"Level_Setup_Events": [
|
|
{
|
|
"Condition": {
|
|
"$or": [
|
|
{
|
|
"$eq": [
|
|
"$Value.Event_metricvalue",
|
|
"Painting_A"
|
|
]
|
|
},
|
|
{
|
|
"$eq": [
|
|
"$Value.Event_metricvalue",
|
|
"Painting_B"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"Transition": "Success"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Input": {
|
|
"Name": "Level_Setup_Events",
|
|
"Value": {
|
|
"Event_metricvalue": "Painting_A"
|
|
}
|
|
}
|
|
},
|
|
"ordering": {
|
|
"Definition": {
|
|
"Context": {
|
|
"Var1": 1,
|
|
"Var2": 10
|
|
},
|
|
"States": {
|
|
"Start": {
|
|
"-": {
|
|
"$inc": "Var1",
|
|
"$mul": ["Var2", "$.Var1"],
|
|
"$dec": "Var1"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"withContractId": {
|
|
"Definition": {
|
|
"Context": {},
|
|
"States": {
|
|
"Start": {
|
|
"ContractStarted": {
|
|
"Condition": {
|
|
"$eq": ["$.ContractId", "abc123"]
|
|
},
|
|
"Transition": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Input": {
|
|
"Name": "ContractStarted",
|
|
"Value": null
|
|
}
|
|
}
|
|
}
|