Jizoku.Runtime.Journal.Starter (jizoku v0.4.0)

Copy Markdown View Source

Backward-compatible alias for journal start commands.

New code should call Jizoku.Runtime.Journal.Commands.Starter. This module preserves the older runtime namespace for existing host integrations and tests.

Summary

Functions

Starts a module-authored workflow through the journal runtime.

Starts a runtime-authored workflow spec through the journal runtime.

Types

start_error()

Functions

start_run(workflow, trigger_name, payload, opts)

@spec start_run(module(), atom() | nil, map(), keyword()) ::
  {:ok, Jizoku.ReadModel.Inspection.Snapshot.t()}
  | {:ok, {:duplicate_schedule_start, Jizoku.ReadModel.Inspection.Snapshot.t()}}
  | {:error, start_error()}

Starts a module-authored workflow through the journal runtime.

start_spec_run(spec, trigger_name, payload, opts)

@spec start_spec_run(Jizoku.Workflow.Spec.t() | map(), atom() | nil, map(), keyword()) ::
  {:ok, Jizoku.ReadModel.Inspection.Snapshot.t()}
  | {:ok, {:duplicate_schedule_start, Jizoku.ReadModel.Inspection.Snapshot.t()}}
  | {:error, start_error()}

Starts a runtime-authored workflow spec through the journal runtime.