# `AshStateMachine.BuiltinChanges`
[🔗](https://github.com/ash-project/ash_state_machine/blob/v0.3.1/lib/builtin_changes/builtin_changes.ex#L5)

Changes for working with AshStateMachine resources.

# `next_state`

Try and transition to the next state. Must be only one possible next state.

## Options

* `:recheck?` - Pick the next state again in a `before_action` hook if the record's state
  has changed by then, for example because `get_and_lock_for_update()` read it again.
  Declare the lock before this change. Defaults to `false`.

# `transition_state`

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](getting-started-with-ash-state-machine.md#transitions-and-stale-records)
for ways to check it against the stored record instead.

## Options

* `:recheck?` - Check the transition again in a `before_action` hook if the record's state
  has changed by then, for example because `get_and_lock_for_update()` read it again.
  Declare the lock before this change. Defaults to `false`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
