How to: Configure the state machine
For information about prerequisites, see Creating Participants.
If needed, you can override the default state machine for the Participant.
To configure the state machine for the sample mobiledevice type, call the Update State Machine Config endpoint and pass a request body similar to the following:
{
"states": {
"onboarding": {
"defaultSubState": "onboarding",
"subStates": [
{
"name": "onboarding",
"transitions": [
{
"eventCode": "E-022",
"destination": "active:active"
}
]
}
]
},
"active": {
"defaultSubState": "active",
"subStates": [
{
"name": "active",
"transitions": [
{
"eventCode": "E-023",
"destination": "active:active",
"reasonCode": "R-0001"
}
]
}
]
},
"inactive": {
"defaultSubState": "inactive",
"subStates": [
{
"name": "inactive",
"transitions": [
{
"eventCode": "E-024",
"destination": "inactive:dead",
"reasonCode": "R-0001"
}
]
},
{
"name": "dead",
"transitions": []
}
],
"terminalStates": [
"dead"
]
}
},
"terminalTTL": "2m"
}
Updated 10 months ago