Jizoku.Step behaviour (jizoku v0.4.0)

Copy Markdown View Source

Public contract for authoring native Jizoku workflow steps.

Native steps return Jizoku values and receive a Jizoku.Step.Context. The runtime adapts them into the internal Jido execution path, so authors do not need to depend on Jido for the common workflow-step path.

Summary

Types

continuation_request()

@type continuation_request() :: %{
  input: map(),
  continuation_key: String.t(),
  definition: :current
}

result()

@type result() ::
  {:ok, map()}
  | {:ok, map(), keyword()}
  | {:continue_as_new, map(), keyword()}
  | {:defer, term(), keyword()}
  | {:error, term()}
  | {:retry, term()}
  | {:retry, term(), keyword()}

schema()

@type schema() :: keyword(keyword())

Callbacks

run(input, context)

@callback run(input :: map(), context :: Jizoku.Step.Context.t()) :: result()