Learn how it works
Draft
Initial request creation
Submitted
Awaiting decision
Approved
FinalRequest approved
Rejected
FinalRequest rejected
Create a new approval request in draft state
N/A (initialization)
Set initial state data
The state machine is created in its initial state (draft) with the initial data payload. No transitions have occurred yet.
{
"requestId": "REQ-001",
"title": "New Equipment Purchase",
"requestor": "alice@company.com",
"amount": 5000
}State machines move from one state to another via events. Each transition has a source state, target state, and event type.
Guards are JSON Logic expressions that must evaluate to true for a transition to occur.
Effects modify the state data when a transition executes using the merge operation.
States marked as final prevent further transitions. Once reached, the workflow is complete.
Switch to Interactive Playground mode to create a real state machine on the metagraph!