Serializable, normalized workflow specification used to rebuild planner state.
The public workflow DSL compiles to the runtime definition used by durable execution. This struct captures the same workflow shape as plain data so planner state can be reconstructed without exposing Runic structs as public API.
Summary
Functions
Validates a workflow spec as data without loading workflow or step modules.
Types
@type t() :: %Squidie.Workflow.Spec{ definition_version: String.t() | nil, entry_step: atom() | nil, entry_steps: [atom()], initial_step: atom(), payload: [Squidie.Workflow.Definition.payload_field()], retries: [Squidie.Workflow.Definition.retry()], steps: [Squidie.Workflow.Definition.step()], transitions: [Squidie.Workflow.Definition.transition()], triggers: [Squidie.Workflow.Definition.trigger()], workflow: module() }
@type validation_error() :: %{ path: [atom() | non_neg_integer()], code: atom(), message: String.t(), details: map() }
Functions
@spec validate(t() | map() | term()) :: :ok | {:error, {:invalid_workflow_spec, [validation_error()]}}
Validates a workflow spec as data without loading workflow or step modules.