Definitions and state types
A definition declares its key, schema version, initial state, variables, states and transitions. JSONC supports comments and trailing commas for authoring; the formal JSON Schema lives in schema/.
State kinds
| Kind | Purpose |
|---|---|
automatic | Run actions and select an eligible transition. |
wait | Park until a matching external event or broker message arrives. |
human | Create a task and wait for a human resolution. |
timer | Park until the configured timer releases the process. |
call | Invoke a child process according to its configuration. |
terminal | End the process with an outcome. |
fork | Start configured parallel branches. |
join | Meet the fork’s branches under its join rules. |
Transitions and actions
Transitions name a target state and can use guards and priorities. A default transition provides a fallback. Actions can run on entry, on exit, or on the transition itself. A dynamic value is an expression node with $expr and an optional $lang.
{
"id": "approve-small-request",
"to": "approved",
"guard": { "$expr": "vars.amount < 1000" }
}This is a transition fragment, not a full definition. Guards are pure expressions: do not put I/O in them.
Variables
The variable schema can specify type, required values, enumerations, item types and defaults. Strict writes constrain undeclared paths. Required initial variables are validated when an instance starts.
Versions and lifecycle
Publication uses server-assigned versions. Saved versions have an active, deprecated or disabled lifecycle. The operational UI includes version history and JSON comparison. Review lifecycle rules before changing how new starts select a version.
The authoring reference is the authority for fork joins, variable merges, nested actions and validation limits.