Squidie.Runtime.Journal.Starter (squidie v0.3.3)

Copy Markdown View Source

Backward-compatible alias for journal start commands.

New code should call Squidie.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, Squidie.ReadModel.Inspection.Snapshot.t()}
  | {:ok,
     {:duplicate_schedule_start, Squidie.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(
  Squidie.Workflow.Spec.t() | map(),
  atom() | nil,
  map(),
  keyword()
) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()}
  | {:ok,
     {:duplicate_schedule_start, Squidie.ReadModel.Inspection.Snapshot.t()}}
  | {:error, start_error()}

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