Jidoka.Workflow.Loop (Jidoka v0.9.0)

Copy Markdown View Source

Executes one explicit bounded workflow loop.

A loop callback receives its declared input map and the workflow context. It returns one of these values:

  • {:cont, state} or {:cont, state, created_work};
  • {:halt, value};
  • {:suspend, state} or {:suspend, state, created_work}; or
  • {:error, reason}.

The runtime records each decision and all runtime-created work. It never executes more than the declared maximum number of iterations.

Summary

Types

outcome()

@type outcome() ::
  {:ok, Jidoka.Workflow.Loop.Result.t()}
  | {:suspend, Jidoka.Workflow.Loop.Cursor.t()}
  | {:error, term()}