Synapse.Workflow.Spec.Step (Synapse v0.1.1)

View Source

Represents a single workflow step (action invocation) and its metadata.

Summary

Functions

Normalizes a step definition into a struct.

Types

on_error_mode()

@type on_error_mode() :: :halt | :continue

t()

@type t() :: %Synapse.Workflow.Spec.Step{
  action: module(),
  description: String.t() | nil,
  id: atom(),
  label: String.t() | nil,
  metadata: map(),
  on_error: on_error_mode(),
  params: map() | keyword() | (map() -> map()),
  requires: [atom()],
  retry: %{max_attempts: pos_integer(), backoff: non_neg_integer()},
  timeout: pos_integer() | nil
}

Functions

new(step)

@spec new(t() | map() | keyword()) :: t()

Normalizes a step definition into a struct.