Executes one workflow step through Jido and persists the outcome.
This module is the runtime boundary where declarative workflow definitions are turned into durable step execution and persisted run progress.
Summary
Functions
Executes pending compensation for a failed run.
Types
@type execution_error() :: :not_found | {:invalid_workflow, module() | String.t()} | {:invalid_step, atom() | String.t() | nil} | {:dispatch_failed, term()} | {:invalid_run, Ecto.Changeset.t()} | {:invalid_transition, SquidMesh.Run.status(), SquidMesh.Run.status()} | {:invalid_compensation_run_status, SquidMesh.Run.status()} | {:unknown_transition, atom(), atom()} | {:unknown_step, atom()} | {:missing_config, [atom()]}
Functions
@spec compensate( Ecto.UUID.t(), keyword() ) :: :ok | {:error, execution_error() | term()}
Executes pending compensation for a failed run.
Compensation jobs are separate from step execution jobs so the failed run and
failed step attempt are durable before rollback side effects start. If a
compensation callback fails, the run remains failed and its last_error is
updated with the compensation failure details for inspection.
@spec execute(Ecto.UUID.t(), expected_step(), keyword()) :: :ok | {:error, execution_error() | term()}