Caravela.Flow.Steps.Each (Caravela v0.9.1)

Copy Markdown View Source

Iterate a collection already in state under key. For every item, invoke fun.(item, state). The fun may return:

  • {:ok, new_state} — continue with updated state
  • {:skip, reason} — skip this item, continue
  • {:error, reason} — abort the whole flow

Summary

Types

t()

@type t() :: %Caravela.Flow.Steps.Each{fun: (any(), map() -> any()), key: atom()}