Temporalex.Start (Temporalex v0.5.4)

Copy Markdown View Source

A workflow start as data.

Built by a workflow module's generated new/2, shaped by the chain steps on Temporalex, and performed by exactly one terminal verb (Temporalex.start!/1 or Temporalex.execute!/1). Until the terminal verb runs, nothing has happened — the struct is inspectable, assertable in tests, and reusable.

booking_id
|> Booking.new()
|> Temporalex.retry(max_attempts: 3)
|> Temporalex.fairness(salon_id)
|> Temporalex.execute!()

See docs/rfcs/0002-client-surface.md.

Summary

Types

t()

One workflow start, fully resolved except for execution.

Types

t()

@type t() :: %Temporalex.Start{
  client: atom() | nil,
  id: String.t() | :generate,
  input: term(),
  opts: keyword(),
  queue: String.t(),
  timeout: pos_integer() | :infinity | nil,
  workflow: module()
}

One workflow start, fully resolved except for execution.

  • :workflow — the workflow module
  • :input — the durable input, after the module's input/1
  • :id — the workflow id from id/1 or id:, or the :generate sentinel, resolved to a fresh id at the terminal verb
  • :queue — the task queue
  • :client — the client name, or nil for the default client
  • :timeout — how long a waiter waits; carried onto the handle by start!
  • :opts — remaining pass-through options (see @passthrough_opts)