Persistence and dispatch handling for completed step executions.
SquidMesh.Runtime.StepExecutor delegates here after a step finishes so the
orchestration flow stays readable while success, failure, retry, and dispatch
error handling remain together.
Summary
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()} | {:no_runnable_step, [atom()]} | {:unknown_transition, atom(), atom()} | {:unknown_step, atom()} | {:missing_config, [atom()]}
Functions
@spec apply_execution_result( {:ok, map(), keyword()} | {:error, term()}, SquidMesh.Config.t(), SquidMesh.Workflow.Definition.t(), SquidMesh.Run.t(), atom(), Ecto.UUID.t(), Ecto.UUID.t(), pos_integer(), integer() ) :: :ok | {:error, execution_error() | term()}
@spec persist_execution_result( {:ok, map(), keyword()} | {:error, term()}, atom(), SquidMesh.Config.t(), SquidMesh.Workflow.Definition.t(), SquidMesh.Run.t(), Ecto.UUID.t(), Ecto.UUID.t(), pos_integer(), integer() ) :: :ok | {:error, execution_error() | term()}