Jido.Flow.Iterate (Jido Action v3.0.0-beta.12)

View Source

A bounded local loop in a canonical Flow.

Create it with new/1, the Flow module DSL, map-based definitions, or Jido.Flow.Codec. An Iterate uses local state and stops when its completion condition is true. It fails when it reaches max_iterations first.

Summary

Functions

Builds and validates one canonical Iterate component.

Builds one canonical Iterate component or raises its validation error.

Types

t()

@type t() :: %Jido.Flow.Iterate{
  action: atom(),
  completion: any(),
  max_iterations: integer(),
  meta: map(),
  name: binary(),
  needs: [binary()],
  params: any(),
  state: any()
}

Functions

new(iterate)

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

Builds and validates one canonical Iterate component.

new!(attrs)

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

Builds one canonical Iterate component or raises its validation error.