@bitsinfra/fusee
    Preparing search index...

    Class StepCtx

    What a step's function gets when it declares a parameter: ctx.step("charge", (s) => pay({ idempotencyKey: s.key, signal: s.signal })).

    Index
    attempt: number

    1 on the first attempt, then 2, 3, ...

    name: string

    The step's name.

    • get key(): string

      A key stable across retries and recovery, distinct for each step of each run: pass it to services that accept idempotency keys.

      Returns string

    • get signal(): AbortSignal

      Aborted when this attempt times out (or misses its heartbeat), or the run is cancelled, terminated or closed. Pass it to fetch and the like.

      Returns AbortSignal

    • get workflowId(): string

      Returns string

    • Reports progress; resets the heartbeat timeout. Coalesced; never waits for the disk.

      Type Parameters

      • T

      Parameters

      • Optionalprogress: T

      Returns void

    • The latest progress this step reported, also from an attempt before a crash.

      Type Parameters

      • T

      Returns T | undefined

    • Opens this step's stream name (see ctx.stream).

      Parameters

      • name: string

      Returns StreamWriter