Modules
Declarative workflow orchestration for Ash Framework.
Ash calculation that returns the list of user-facing actions available for a workflow record's current step.
Ash calculation that returns the name of the workflow's current step.
Ash calculation that returns the occurred_at of the most recent transition
log row where from_state != to_state.
Ash calculation listing the timeouts still ahead of a record in its current step, soonest first.
Ash calculation that returns the list of all workflow step names.
An Ash change that evaluates an automatic step's on_success routes to
determine the transition target.
An Ash change that evaluates conditional routes at runtime to determine the transition target.
Records a workflow event: writes through state_entered_at and, if a
transition_log is configured, appends one row describing what happened.
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.
Re-exports Ash policy check helpers for use inside workflow step blocks.
The duration tuple a timeout measures with fire_after and a retry block
waits with backoff.
Configures actor capture on a transition_log.
Defines the failure policy for a step's or timeout's generated work.
A conditional target for a transition. Evaluated at runtime using Ash.Expr.eval/2.
Defines a workflow step entity with its configuration schema.
Defines a workflow timeout entity with its configuration schema.
A named transition from a manual step to another step.
Configures an opt-in transition log for a workflow.
Configures undo for a workflow.
Raised (or returned) when undo is called on a record that cannot be
rewound.
Introspection helpers for AshWorkflow resources.
The behaviour a module implements to run a workflow's scheduled work.
Answers whether this node is the one that should arm timers.
Borrows leadership from Oban.Peer.leader?/2.
Always the leader. The default for AshWorkflow.Scheduler.Precise.
Runs a workflow's scheduled work through ash_oban. The default scheduler.
Fires scheduled work by arming a timer for each deadline, rather than polling for records whose deadline has passed.
Holds the armed deadlines for AshWorkflow.Scheduler.Precise.
One unit of scheduled work a workflow declares, in AshWorkflow's own terms.
The :telemetry events AshWorkflow emits.
Generates and modifies Ash actions based on workflow step declarations.
Adds the state_entered_at attribute if not already defined on the resource.
Generates workflow calculations on the resource.
Generates code interface definitions for workflow actions.
Adds the composite indexes that the generated Oban triggers need, for
resources using AshPostgres.DataLayer.
Generates Ash policies from workflow step declarations.
Describes the workflow's scheduled work, then hands it to the selected scheduler.
Generates ash_state_machine configuration from workflow steps.
Runtime helpers shared by AshWorkflow.Changes.RecordEvent and the
generated state_at/2 and history/1 code interface functions.
Runtime resolution for the generated undo action: decides whether a record
may be rewound, and to where.
Rejects a retry block declared on a step nothing is scheduled for.
Verifies that a workflow declaring a policy has an authorizer to enforce it.
Verifies that timeout field options are valid.
Rejects timeouts whose deadline is shorter than the selected scheduler can honour.
Verifies that a configured transition_log resource has the schema
AshWorkflow.Changes.RecordEvent and the state_at/2/history/1 code
interface depend on.
Verifies that undo is coherently configured.
Verifies that workflow step declarations are valid and internally consistent.
Mix Tasks
Seeds an approximate :initial transition-log row for existing records.
Scaffolds a transition log resource for a workflow
Installs AshWorkflow, along with AshOban, AshStateMachine and Oban