Jidoka.Workflow.Step (Jidoka v0.9.0)

Copy Markdown View Source

Data contract for one deterministic workflow step.

Summary

Functions

Returns the supported deterministic workflow step kinds.

Returns the supported map target kinds.

Parses workflow step attributes into a validated step.

Parses workflow step attributes into a validated step or raises.

Returns the Zoi schema for workflow steps.

Types

t()

@type t() :: %Jidoka.Workflow.Step{
  after: [atom()],
  condition: nil | nil | any(),
  condition_unless: nil | nil | any(),
  condition_when: nil | nil | any(),
  context: any(),
  initial: nil | nil | any(),
  input: any(),
  kind: (((((:function | :action) | :agent) | :gate) | :map) | :reduce) | :loop,
  max_concurrency: nil | nil | integer(),
  max_iterations: nil | nil | integer(),
  metadata: map(),
  name: atom(),
  over: nil | nil | any(),
  prompt: nil | nil | any(),
  retry: nil | nil | term(),
  target: nil | nil | any(),
  target_kind: :function | :action,
  using: nil | nil | any()
}

Functions

kinds()

@spec kinds() :: [atom()]

Returns the supported deterministic workflow step kinds.

map_targets()

@spec map_targets() :: [atom()]

Returns the supported map target kinds.

new(attrs)

@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}

Parses workflow step attributes into a validated step.

new!(attrs)

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

Parses workflow step attributes into a validated step or raises.

schema()

@spec schema() :: Zoi.schema()

Returns the Zoi schema for workflow steps.