Odyssey.Workflow (odyssey v0.2.1)

View Source

A workflow is a sequence of phases that are executed in order.

Summary

Types

id()

@type id() :: term()

t()

@type t() :: [Odyssey.Phase.t()]

Functions

jump_to(workflow_id, index)

@spec jump_to(id(), Odyssey.Phase.index()) :: Odyssey.DB.WorkflowRun.t() | nil

run_next_phase(workflow_run)

@spec run_next_phase(Odyssey.DB.WorkflowRun.t()) ::
  Odyssey.DB.WorkflowRun.t() | {:error, term()}

runs(statuses, limit \\ 100)

start(workflow, name \\ nil, state)

@spec start(t(), String.t() | nil, Odyssey.State.t()) ::
  {:ok, Odyssey.DB.WorkflowRun.t()} | {:error, term()}

start!(workflow, name \\ nil, state)

@spec start!(t(), String.t() | nil, Odyssey.State.t()) :: Odyssey.DB.WorkflowRun.t()

stop(id)

@spec stop(id()) :: Odyssey.DB.WorkflowRun.t() | nil