Start
Use /track/start/ with the target record and
state-machine description, under permissions that can access the
required objects.
Daptin
Run Daptin →
State tracking guide
Store a state-machine description, enable tracking for the table, start a state instance, and submit named events through the tracking endpoints.
StateMachineDescriptions:
- Name: order_lifecycle
InitialState: pending
Events:
- Name: confirm
Src: [pending]
Dst: confirmed
- Name: ship
Src: [confirmed]
Dst: shipped
- Name: cancel
Src: [pending, confirmed]
Dst: cancelled
Set IsStateTrackingEnabled: true on the application
table. Daptin creates its companion state table, including current
state, links to the record and state-machine description, and user
tracking fields.
Use /track/start/ with the target record and
state-machine description, under permissions that can access the
required objects.
Send the named event to /track/event/. Its current
state must appear in the event's source list.
Attempt shipping from pending or repeating a one-way event and verify that current state remains unchanged.
Inspect the companion state records to explain which accepted events moved the record to its current state.
State tracking validates and records transitions. It does not define entry or exit handlers and does not automatically invoke a Daptin action when an event succeeds. When confirming an order must also reserve stock or send mail, expose a permissioned action that performs the required work and explicitly applies the transition.