Sanity Library Reference Docs
    Preparing search index...
    interface WorkflowEvaluation {
        actor: Actor;
        autonomy: WorkflowAutonomy;
        blockingMissingDocuments?: MissingDocument[];
        canInteract: boolean;
        currentStage: StageEvaluation;
        definition: {
            description?: string;
            fields?: FieldEntry[];
            groups?: Group[];
            initialStage: string;
            lifecycle?: WorkflowLifecycle;
            name: string;
            predicates?: Record<string, string>;
            roleAliases?: RoleAliases;
            semantics?: Semantic[];
            stages: Stage[];
            start?: StartBlock;
            title: string;
        };
        editableFields: EditableFieldEvaluation[];
        fieldInsights: FieldInsight[];
        instance: WorkflowInstance;
        missingDocuments?: MissingDocument[];
        nextEvaluationAt?: string;
        pendingOnYou: ActivityEvaluation[];
        semantics?: Semantic[];
    }
    Index

    Properties

    actor: Actor

    The whole definition's causal-autonomy rollup: per activity, per stage, and workflow-wide — will each level resolve without a caller, and what does it wait on. Static (no instance state), stamped here so every consumer reads one derivation. Spawn children are not resolved at evaluation time, so their legs report conditional.

    blockingMissingDocuments?: MissingDocument[]

    Missing required reference targets, or references read by unmet runtime requirements or transition conditions, including named predicates in their evaluated scope. Empty when missing references are optional for current progress. Omitted when no references are missing.

    canInteract: boolean

    True if at least one action on any active activity is allowed.

    currentStage: StageEvaluation
    definition: {
        description?: string;
        fields?: FieldEntry[];
        groups?: Group[];
        initialStage: string;
        lifecycle?: WorkflowLifecycle;
        name: string;
        predicates?: Record<string, string>;
        roleAliases?: RoleAliases;
        semantics?: Semantic[];
        stages: Stage[];
        start?: StartBlock;
        title: string;
    }
    editableFields: EditableFieldEvaluation[]

    Declared-editable fields in the current scope (workflow + current stage + its activities), each with this actor's edit verdict and the current value's provenance. The reactive edit-seam surface; empty when the workflow declares no editable fields.

    fieldInsights: FieldInsight[]

    Per-field derived state across every condition site in the current stage: which gates read each field (involvement) and the counterfactually verified consequences of the values that would unblock blocking atoms. Empty when no condition reads a field.

    missingDocuments?: MissingDocument[]

    Missing targets of populated subject, doc.ref, and doc.refs fields in active scopes. Clears on resolution; empty fields and exited-stage fields are excluded. Required reference declarations and runtime conditions determine whether absence blocks progress.

    nextEvaluationAt?: string

    The earliest future ISO 8601 instant the engine can derive for a time-based change to this evaluation. Re-evaluate then. Includes a gate reading $now beside $actor, $assigned, $can, or $attributes, evaluated in this actor's scopes. Derived per call, never persisted.

    Absent on a terminal instance or when the engine cannot derive a boundary. Conditions using date arithmetic may yield no boundary. Time can still affect a nonterminal instance when this value is absent.

    pendingOnYou: ActivityEvaluation[]

    Active activities whose singular or plural assignment entry matches the actor.

    semantics?: Semantic[]

    The workflow's advisory meaning, unchanged from its definition.