Durable.Storage.Schemas.PendingEvent (Durable v0.1.0-rc)

View Source

Ecto schema for pending event records.

Pending events represent external events that a workflow is waiting for before continuing execution.

Summary

Functions

Creates a changeset for cancelling a pending event.

Creates a changeset for inserting a new pending event.

Creates a changeset for receiving an event with payload.

Creates a changeset for timing out a pending event.

Types

status()

@type status() :: :pending | :received | :timeout | :cancelled

t()

@type t() :: %Durable.Storage.Schemas.PendingEvent{
  __meta__: term(),
  completed_at: DateTime.t() | nil,
  event_name: String.t(),
  foreach_id: integer() | nil,
  foreach_index: integer() | nil,
  id: Ecto.UUID.t(),
  inserted_at: DateTime.t(),
  parallel_id: integer() | nil,
  payload: map() | nil,
  status: status(),
  step_name: String.t(),
  timeout_at: DateTime.t() | nil,
  timeout_value: term() | nil,
  updated_at: DateTime.t(),
  wait_group_id: Ecto.UUID.t() | nil,
  wait_type: wait_type(),
  workflow: term(),
  workflow_id: Ecto.UUID.t()
}

wait_type()

@type wait_type() :: :single | :any | :all

Functions

cancel_changeset(pending_event)

Creates a changeset for cancelling a pending event.

changeset(pending_event, attrs)

Creates a changeset for inserting a new pending event.

receive_changeset(pending_event, payload)

Creates a changeset for receiving an event with payload.

timeout_changeset(pending_event)

Creates a changeset for timing out a pending event.