# `AshWorkflow.Changes.UndoTransition`
[🔗](https://github.com/team-alembic/ash_workflow/blob/v0.12.0/lib/ash_workflow/changes/undo_transition.ex#L1)

Performs the state half of an undo: resolves the row to reverse, rewinds the
record to that row's `from_state`, and hands the row to
`AshWorkflow.Changes.RecordEvent` through the changeset context so the new
log row can point at it.

The target is only known once the log has been read, so this cannot be an
atomic update — the same reason `AshWorkflow.Changes.ConditionalTransition`
opts out. A changeset filter on the current state closes the resulting
window: if a concurrent transition moves the record between the read and the
write, the update matches no rows and Ash raises a stale-record error rather
than rewinding to a state that is no longer the one being undone.

Used internally by `AshWorkflow.Transformers.AddActions`. Not intended for
direct use.

---

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