bunqueue v2.8 API referenceall versions · guide
bunqueue
    Preparing search index...

    Class Workflow<TInput, TSteps>

    Type Parameters

    • TInput = unknown
    • TSteps extends Record<string, unknown> = Record<string, unknown>
    Index
    • Type Parameters

      • TInput = unknown
      • TSteps extends Record<string, unknown> = Record<string, unknown>

      Parameters

      • name: string
      • options: { revision?: string | number } = {}

      Returns Workflow<TInput, TSteps>

    name: string
    nodes: WorkflowNode[] = []
    revision: string

    Explicit semantic revision. Bump it when handler or condition behavior changes incompatibly without changing the graph shape.

    • Step names that generate indexed per-iteration records (name:0, name:1, ...). Loop bodies and forEach steps both do; a plain step never does.

      Returns string[]

    • Mark the point of no return.

      Everything before it stays compensatable; everything after is committed and is never rolled back, however the run ends. Past the pivot the only correct recovery is forward — retry, alert, fix — because there is no semantic inverse for "the welcome email was sent". Declare it explicitly; it is never inferred.

      Returns this

    • Wait for an external signal before continuing

      Parameters

      • event: string
      • Optionaloptions: { timeout?: number }

      Returns this