Changes for working with AshStateMachine resources.
Summary
Functions
Try and transition to the next state. Must be only one possible next state.
Changes the state to the target state, validating the transition
Functions
Try and transition to the next state. Must be only one possible next state.
Options
:recheck?- Pick the next state again in abefore_actionhook if the record's state has changed by then, for example becauseget_and_lock_for_update()read it again. Declare the lock before this change. Defaults tofalse.
Changes the state to the target state, validating the transition
In non-atomic actions, the transition is checked against the record the action was called with, which may be out of date. See Transitions and stale records for ways to check it against the stored record instead.
Options
:recheck?- Check the transition again in abefore_actionhook if the record's state has changed by then, for example becauseget_and_lock_for_update()read it again. Declare the lock before this change. Defaults tofalse.