OS1 Services
...
Entity
How to use Entities?

How to: Configure the State Machine for Entity type

1min
for information about prerequisites, see how to use entities? docid\ f5dbrxwuq321l b2mes3v to configure the state of an entity type, call the register state machine config for entity type docid 9mldmvd127j2oftwzgsug endpoint request bodies are specified in json format the following example shows a request body for configuring the state machine for entity type { "states" \[ { "name" "onboarding", "defaultsubstate" "onboarding", "substates" \[{ "name" "onboarding", "transitions" \[{ "eventcode" "e 001", "destination" "active\ active" }], "ttl" { "time" "40s", "destination" "onboarding\ onboarding" } }] },{ "name" "active", "defaultsubstate" "active", "substates" \[{ "name" "active", "transitions" \[{ "eventcode" "e 002", "destination" "inactive\ inactive" }], "ttl" { "time" "40s", "destination" "active\ active" } }] },{ "name" "inactive", "defaultsubstate" "inactive", "substates" \[{ "name" "inactive", "transitions" \[{ "eventcode" "e 004", "destination" "inactive\ inactive" }], "ttl" { "time" "40s", "destination" "inactive\ inactive" } }] } ], "terminalttl" "300s", "callback" "https //examplecallback com" }