# AshWorkflow v0.12.0 - Table of Contents > Declarative workflow orchestration for the Ash Framework — multi-step workflows combining human actions, background jobs, and time-based deadlines. ## GUIDES - [Home](readme.md) - Tutorials - [Getting Started with AshWorkflow](getting-started-with-ash-workflow.md) - Topics - [Automatic vs Manual Steps](automatic-vs-manual-steps.md) - [Error Handling](error-handling.md) - [Timeouts and Deadlines](timeouts-and-deadlines.md) - [Workflow History](workflow-history.md) - [Undo](undo.md) - [Authorization](authorization.md) - [Telemetry](telemetry.md) - [Signals](signals.md) - [Workflows and Relationships](workflows-and-relationships.md) - [Diagrams](diagrams.md) - [Comparison to BPMN 2.0](bpmn-comparison.md) - Recipes - [Recipes](recipes.md) - [Approval](approval.md) - [Expiry](expiry.md) - [Dormancy](dormancy.md) - [Sync](sync.md) - [Invitation](invitation.md) - [Verification](verification.md) - [Deletion](deletion.md) - [Acknowledgement](acknowledgement.md) - [Publication](publication.md) - [Review](review.md) - DSLs - [AshWorkflow](dsl-ashworkflow.md) ## Modules - Dsl - [AshWorkflow](AshWorkflow.md): Declarative workflow orchestration for Ash Framework. - Entities - [AshWorkflow.Entities.Step](AshWorkflow.Entities.Step.md): Defines a workflow step entity with its configuration schema. - [AshWorkflow.Entities.Timeout](AshWorkflow.Entities.Timeout.md): Defines a workflow timeout entity with its configuration schema. - [AshWorkflow.Entities.Transition](AshWorkflow.Entities.Transition.md): A named transition from a manual step to another step. - [AshWorkflow.Entities.TransitionLog](AshWorkflow.Entities.TransitionLog.md): Configures an opt-in transition log for a workflow. - [AshWorkflow.Entities.Undo](AshWorkflow.Entities.Undo.md): Configures undo for a workflow. - Checks - [AshWorkflow.Checks](AshWorkflow.Checks.md): Re-exports Ash policy check helpers for use inside workflow step blocks. - Telemetry - [AshWorkflow.Telemetry](AshWorkflow.Telemetry.md): The `:telemetry` events AshWorkflow emits. - Charts - [AshWorkflow.Charts](AshWorkflow.Charts.md): Draws a workflow as a diagram. - [AshWorkflow.Charts.Backend](AshWorkflow.Charts.Backend.md): The contract a diagram format implements. - [AshWorkflow.Charts.Dot](AshWorkflow.Charts.Dot.md): Draws an `AshWorkflow.Charts.Graph` as a [Graphviz](https://graphviz.org) DOT diagram: the steps, edges and labels of `AshWorkflow.Charts.Mermaid`, with colour and line styles. The `dot` command of Graphviz draws DOT as SVG, PNG or PDF. - [AshWorkflow.Charts.Graph](AshWorkflow.Charts.Graph.md): The diagram model every `AshWorkflow.Charts` backend draws from. - [AshWorkflow.Charts.Graph.Edge](AshWorkflow.Charts.Graph.Edge.md): One way a record can move from one step to another, as `AshWorkflow.Charts.Graph.build/2` gives it to a chart backend. - [AshWorkflow.Charts.Graph.Node](AshWorkflow.Charts.Graph.Node.md): One step of a workflow, as `AshWorkflow.Charts.Graph.build/2` gives it to a chart backend. - [AshWorkflow.Charts.Graph.Note](AshWorkflow.Charts.Graph.Note.md): Something a step does without leaving it, attached to its `AshWorkflow.Charts.Graph.Node`. - [AshWorkflow.Charts.Json](AshWorkflow.Charts.Json.md): An `AshWorkflow.Charts.Graph` as plain data, for a client that draws the workflow itself: D3 with a layout library such as dagre or ELK.js, Cytoscape, React Flow, or a LiveView hook. - [AshWorkflow.Charts.Mermaid](AshWorkflow.Charts.Mermaid.md): Draws an `AshWorkflow.Charts.Graph` as a Mermaid `stateDiagram-v2`. - [AshWorkflow.Charts.Palette](AshWorkflow.Charts.Palette.md): The colours of the charts that `AshWorkflow.Charts.Dot` draws, for each theme. A backend that draws in colour reads them here, so every such chart has the same look. - Internals - [AshWorkflow.Calculations.AvailableActions](AshWorkflow.Calculations.AvailableActions.md): Ash calculation that returns the list of user-facing actions available for a workflow record's current step. - [AshWorkflow.Calculations.CurrentStep](AshWorkflow.Calculations.CurrentStep.md): Ash calculation that returns the name of the workflow's current step. - [AshWorkflow.Calculations.PendingDeadlines](AshWorkflow.Calculations.PendingDeadlines.md): Ash calculation listing the timeouts and `every` entries still ahead of a record in its current step, soonest first. - [AshWorkflow.Calculations.Steps](AshWorkflow.Calculations.Steps.md): Ash calculation that returns the list of all workflow step names. - [AshWorkflow.Calculations.TransitionTargets](AshWorkflow.Calculations.TransitionTargets.md): Ash calculation that maps each transition of a record's current step to the step it would move the record to, as `AshWorkflow.Info.transition_target/3` resolves it. - [AshWorkflow.Changes.ConditionalOnSuccess](AshWorkflow.Changes.ConditionalOnSuccess.md): An Ash change that evaluates an automatic step's `on_success` routes to determine the transition target. - [AshWorkflow.Changes.ConditionalTransition](AshWorkflow.Changes.ConditionalTransition.md): An Ash change that evaluates conditional routes at runtime to determine the transition target. - [AshWorkflow.Changes.RecordEvent](AshWorkflow.Changes.RecordEvent.md): Records a workflow event: writes through `state_entered_at` and, if a `transition_log` is configured, appends one row describing what happened. - [AshWorkflow.Changes.RefuseStaleTransition](AshWorkflow.Changes.RefuseStaleTransition.md): Refuses a transition built from a stale record: the update writes only if the row still holds the values the transition decided from. - [AshWorkflow.Changes.UndoTransition](AshWorkflow.Changes.UndoTransition.md): 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. - [AshWorkflow.Charts.Format](AshWorkflow.Charts.Format.md): Writes DSL values out as the short phrases a chart shows. - [AshWorkflow.Clarity.Content.StepDiagram](AshWorkflow.Clarity.Content.StepDiagram.md): Clarity tab that draws one workflow step with every step a single move away from it. - [AshWorkflow.Clarity.Content.StepOverview](AshWorkflow.Clarity.Content.StepOverview.md): Clarity tab that describes one workflow step: what runs on entry, who may move the record on, the ways in and out, and the timers that fire while a record waits there. - [AshWorkflow.Clarity.Content.StepTimeline](AshWorkflow.Clarity.Content.StepTimeline.md): Clarity tab that lays out what happens to a record in one workflow step, in order of how long after entering the step it happens. - [AshWorkflow.Clarity.Content.WorkflowDiagram](AshWorkflow.Clarity.Content.WorkflowDiagram.md): Clarity tab that draws a workflow resource's steps and moves as a state diagram, with each step coloured by its kind. - [AshWorkflow.Clarity.Content.WorkflowOverview](AshWorkflow.Clarity.Content.WorkflowOverview.md): Clarity tab that summarises a workflow resource: its steps, every move between them, its timers, undo and transition log, and the work it hands to the scheduler. - [AshWorkflow.Clarity.Content.WorkflowTiming](AshWorkflow.Clarity.Content.WorkflowTiming.md): Clarity tab that lists, step by step, how long a record of a workflow resource can stay in each step and what happens to it at each moment while it is there. - [AshWorkflow.Clarity.Introspector](AshWorkflow.Clarity.Introspector.md): Adds a `AshWorkflow.Clarity.Vertex.Step` for each step of every resource that uses `AshWorkflow`, linked from the resource by a `:workflow_step` edge. - [AshWorkflow.Clarity.Lensmaker](AshWorkflow.Clarity.Lensmaker.md): Adds a Workflows lens to Clarity: the resources that use `AshWorkflow`, each with its steps, and the applications and domains that lead to them. - [AshWorkflow.Clarity.Vertex.Step](AshWorkflow.Clarity.Vertex.Step.md): One step of an `AshWorkflow` resource, as a vertex in the Clarity graph. - [AshWorkflow.Duration](AshWorkflow.Duration.md): The duration tuple a `timeout` measures with `fire_after` and a `retry` block waits with `backoff`. - [AshWorkflow.Entities.BelongsToActor](AshWorkflow.Entities.BelongsToActor.md): Configures actor capture on a `transition_log`. - [AshWorkflow.Entities.Emit](AshWorkflow.Entities.Emit.md): A signal the workflow fires when a workflow event happens, from the module named by the workflow's `signals` option. - [AshWorkflow.Entities.Every](AshWorkflow.Entities.Every.md): Defines a recurring action entity with its configuration schema. - [AshWorkflow.Entities.OnSignal](AshWorkflow.Entities.OnSignal.md): Defines a step's handler for a signal from an `Ash.Signals` module. - [AshWorkflow.Entities.Retry](AshWorkflow.Entities.Retry.md): Defines the failure policy for a step's or timeout's generated work. - [AshWorkflow.Entities.Route](AshWorkflow.Entities.Route.md): A conditional target for a transition. Evaluated at runtime using `Ash.Expr.eval/2`. - [AshWorkflow.Errors.NoMatchingRoute](AshWorkflow.Errors.NoMatchingRoute.md): Returned (or raised) when an automatic step's action succeeds but none of its `on_success` routes match the resulting record. - [AshWorkflow.Errors.UndoNotPermitted](AshWorkflow.Errors.UndoNotPermitted.md): Raised (or returned) when `undo` is called on a record that cannot be rewound. - [AshWorkflow.Expr](AshWorkflow.Expr.md): Expression helpers for workflow DSL options. - [AshWorkflow.Info](AshWorkflow.Info.md): Introspection helpers for AshWorkflow resources. - [AshWorkflow.Scheduler](AshWorkflow.Scheduler.md): The behaviour a module implements to run a workflow's scheduled work. - [AshWorkflow.Scheduler.Leader](AshWorkflow.Scheduler.Leader.md): Answers whether this node is the one that should arm timers. - [AshWorkflow.Scheduler.Leader.Oban](AshWorkflow.Scheduler.Leader.Oban.md): Borrows leadership from `Oban.Peer.leader?/2`. - [AshWorkflow.Scheduler.Leader.Single](AshWorkflow.Scheduler.Leader.Single.md): Always the leader. The default for `AshWorkflow.Scheduler.Precise`. - [AshWorkflow.Scheduler.Oban](AshWorkflow.Scheduler.Oban.md): Runs a workflow's scheduled work through ash_oban. The default scheduler. - [AshWorkflow.Scheduler.Precise](AshWorkflow.Scheduler.Precise.md): Fires scheduled work by arming a timer for each deadline, rather than polling for records whose deadline has passed. - [AshWorkflow.Scheduler.Precise.Timeline](AshWorkflow.Scheduler.Precise.Timeline.md): Holds the armed deadlines for `AshWorkflow.Scheduler.Precise`. - [AshWorkflow.Scheduler.Work](AshWorkflow.Scheduler.Work.md): One unit of scheduled work a workflow declares, in AshWorkflow's own terms. - [AshWorkflow.Transformers.AddActions](AshWorkflow.Transformers.AddActions.md): Generates and modifies Ash actions based on workflow step declarations. - [AshWorkflow.Transformers.AddAttributes](AshWorkflow.Transformers.AddAttributes.md): Adds the `state_entered_at` attribute if not already defined on the resource. - [AshWorkflow.Transformers.AddCalculations](AshWorkflow.Transformers.AddCalculations.md): Generates workflow calculations on the resource. - [AshWorkflow.Transformers.AddCodeInterface](AshWorkflow.Transformers.AddCodeInterface.md): Generates code interface definitions for workflow actions. - [AshWorkflow.Transformers.AddIndexes](AshWorkflow.Transformers.AddIndexes.md): Adds the composite indexes that the generated Oban triggers need, for resources using `AshPostgres.DataLayer`. - [AshWorkflow.Transformers.AddPolicies](AshWorkflow.Transformers.AddPolicies.md): Generates Ash policies from workflow step declarations. - [AshWorkflow.Transformers.AddRelationships](AshWorkflow.Transformers.AddRelationships.md): Adds a public `has_many :transitions` relationship to the `transition_log` resource when one is configured. - [AshWorkflow.Transformers.AddScheduler](AshWorkflow.Transformers.AddScheduler.md): Describes the workflow's scheduled work, then hands it to the selected scheduler. - [AshWorkflow.Transformers.AddStateMachine](AshWorkflow.Transformers.AddStateMachine.md): Generates ash_state_machine configuration from workflow steps. - [AshWorkflow.TransitionLog](AshWorkflow.TransitionLog.md): Runtime helpers shared by `AshWorkflow.Changes.RecordEvent` and the generated `state_at/2` and `history/1` code interface functions. - [AshWorkflow.Undo](AshWorkflow.Undo.md): Runtime resolution for the generated `undo` action: decides whether a record may be rewound, and to where. - [AshWorkflow.Verifiers.ValidateEvery](AshWorkflow.Verifiers.ValidateEvery.md): Verifies that an `every`'s `until` and `backoff` are coherent, and that the columns it owns — its `last_fired_field` and, with `max_fires` or `backoff`, its fire count — are columns `every` can safely write. - [AshWorkflow.Verifiers.ValidateOnSignal](AshWorkflow.Verifiers.ValidateOnSignal.md): Verifies that every `on_signal` names a signal its module declares, selects records from that signal's fields, and has exactly one valid outcome. - [AshWorkflow.Verifiers.ValidateResourceChangesAtomic](AshWorkflow.Verifiers.ValidateResourceChangesAtomic.md): Rejects a resource-level `change` that cannot run atomically when a workflow action it reaches is built atomic. - [AshWorkflow.Verifiers.ValidateRetry](AshWorkflow.Verifiers.ValidateRetry.md): Rejects a `retry` block declared on a step nothing is scheduled for. - [AshWorkflow.Verifiers.ValidateSignals](AshWorkflow.Verifiers.ValidateSignals.md): Verifies that every `emit` names an `:after_action` signal of the workflow's `signals` module, and that the signal's fields can all be filled. - [AshWorkflow.Verifiers.ValidateStepPolicies](AshWorkflow.Verifiers.ValidateStepPolicies.md): Verifies that a workflow declaring a policy has an authorizer to enforce it. - [AshWorkflow.Verifiers.ValidateTimeoutFields](AshWorkflow.Verifiers.ValidateTimeoutFields.md): Verifies that timeout `field` and `fire_at` options are valid. - [AshWorkflow.Verifiers.ValidateTimeoutFiredFields](AshWorkflow.Verifiers.ValidateTimeoutFiredFields.md): Verifies that each action timeout's `__fired_at` column is one the timeout can safely own. - [AshWorkflow.Verifiers.ValidateTimeoutPrecision](AshWorkflow.Verifiers.ValidateTimeoutPrecision.md): Rejects timeouts and `every` entities whose deadline is shorter than the selected scheduler can honour. - [AshWorkflow.Verifiers.ValidateTransitionLog](AshWorkflow.Verifiers.ValidateTransitionLog.md): Verifies that a configured `transition_log` resource has the schema `AshWorkflow.Changes.RecordEvent` and the `state_at/2`/`history/1` code interface depend on. - [AshWorkflow.Verifiers.ValidateUndo](AshWorkflow.Verifiers.ValidateUndo.md): Verifies that undo is coherently configured. - [AshWorkflow.Verifiers.ValidateWorkflow](AshWorkflow.Verifiers.ValidateWorkflow.md): Verifies that workflow step declarations are valid and internally consistent. ## Mix Tasks - Internals - [mix ash_workflow.backfill_transition_log](Mix.Tasks.AshWorkflow.BackfillTransitionLog.md): Seeds an approximate :initial transition-log row for existing records. - [mix ash_workflow.diagram](Mix.Tasks.AshWorkflow.Diagram.md): Prints or writes a diagram of each AshWorkflow resource. - [mix ash_workflow.gen.acknowledgement](Mix.Tasks.AshWorkflow.Gen.Acknowledgement.md): Adds an acknowledgement workflow to a resource - [mix ash_workflow.gen.approval](Mix.Tasks.AshWorkflow.Gen.Approval.md): Adds an approval workflow to a resource - [mix ash_workflow.gen.deletion](Mix.Tasks.AshWorkflow.Gen.Deletion.md): Adds a deletion workflow to a resource - [mix ash_workflow.gen.dormancy](Mix.Tasks.AshWorkflow.Gen.Dormancy.md): Adds a dormancy workflow to a resource - [mix ash_workflow.gen.expiry](Mix.Tasks.AshWorkflow.Gen.Expiry.md): Adds an expiry workflow to a resource - [mix ash_workflow.gen.invitation](Mix.Tasks.AshWorkflow.Gen.Invitation.md): Adds an invitation workflow to a resource - [mix ash_workflow.gen.publication](Mix.Tasks.AshWorkflow.Gen.Publication.md): Adds a publication workflow to a resource - [mix ash_workflow.gen.review](Mix.Tasks.AshWorkflow.Gen.Review.md): Adds a review workflow to a resource - [mix ash_workflow.gen.sync](Mix.Tasks.AshWorkflow.Gen.Sync.md): Adds a sync workflow to a resource - [mix ash_workflow.gen.transition_log](Mix.Tasks.AshWorkflow.Gen.TransitionLog.md): Scaffolds a transition log resource for a workflow - [mix ash_workflow.gen.verification](Mix.Tasks.AshWorkflow.Gen.Verification.md): Adds a verification workflow to a resource - [mix ash_workflow.install](Mix.Tasks.AshWorkflow.Install.md): Installs AshWorkflow, along with AshOban, AshStateMachine and Oban