# `SquidMesh.Runtime.StepExecutor`
[🔗](https://github.com/ccarvalho-eng/squid_mesh/blob/main/lib/squid_mesh/runtime/step_executor.ex#L1)

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.

# `execution_error`

```elixir
@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`

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

# `execute`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
