SquidMesh.Runtime.StepExecutor (squid_mesh v0.1.0-alpha.3)

Copy Markdown View Source

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

Types

execution_error()

@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()}
  | {:unknown_transition, atom(), atom()}
  | {:unknown_step, atom()}
  | {:missing_config, [atom()]}

expected_step()

@type expected_step() :: atom() | String.t() | nil

Functions

execute(run_id, expected_step \\ nil, overrides \\ [])

@spec execute(Ecto.UUID.t(), expected_step(), keyword()) ::
  :ok | {:error, execution_error() | term()}