Sanity Library Reference Docs
    Preparing search index...

    Interface WorkflowStageTransitionedData

    interface WorkflowStageTransitionedData {
        definitionContentHash?: string;
        dwellMs?: number;
        fromStageIndex: number;
        instanceId: string;
        isRevisit: boolean;
        toIsTerminal: boolean;
        toStageIndex: number;
        via: "transition" | "setStage";
    }

    Hierarchy

    • InstanceScopedEventData
      • WorkflowStageTransitionedData
    Index

    Properties

    definitionContentHash?: string

    Absent only when the definition predates content fingerprinting.

    dwellMs?: number

    Time spent in the exited stage (its entry's enteredAt to this exit, on the engine clock). Omitted when the exited entry is unavailable.

    fromStageIndex: number

    Positional index of the exited stage in the definition's stages[] order — indexes, never names, so the payload stays content-free.

    instanceId: string

    The instance document _id — the per-instance join key (engine-minted <tag>.wf-instance.<random>; caller-supplied ids ride verbatim). One of the payload policy's two deliberate customer-string exceptions — see the module doc.

    isRevisit: boolean

    The entered stage was already visited on this instance — a loop-back.

    toIsTerminal: boolean

    The entered stage is terminal (no transitions out) — reaching it completes the instance.

    toStageIndex: number

    Positional index of the entered stage in the definition's stages[] order.

    via: "transition" | "setStage"

    Condition-driven transition vs. the setStage admin override.