OptionalabortedChain of ancestor workflow instances, root-first. Each entry is a GDR pointing at a WORKFLOW_INSTANCE_TYPE document in the engine's own workflow resource.
OptionalcompletedThe start seed: named values set once at startInstance (or by a
parent's spawn.context) and never mutated after. Conditions and
effect bindings read them as $context.<name>.
Reference to the deployed definition, by its name.
Frozen JSON snapshot of the definition at the moment the instance started.
Resolved workflow fields, retained for the instance's lifetime. Their
initial values come from the definition's fields declarations and
StartInstanceArgs.initialFields.
To declare the workflow's subject document, use
{type: 'subject', name: 'subject', initialValue: {type: 'input'}}.
Conditions read that entry as $fields.subject. The subject field
type identifies its role; naming a doc.ref field subject does not.
OptionalminReader floor — the oldest engine data model that can safely interpret this document. Derived from its persisted features and the retained model-4 baseline, and written alongside WorkflowInstance.modelVersion. Full persists never lower it.
OptionalmodelEngine data-model stamp — the shape contract this document conforms to
(see DATA_MODEL_VERSION), orthogonal to the definition-content
pins (pinnedVersion / pinnedContentHash). Stamped at create and
re-asserted on every full persist; absent on documents last written
before the stamp existed (model 0).
OptionalperspectivePerspective for content reads, including field queries and subworkflow discovery. Defaults to DEFAULT_CONTENT_PERSPECTIVE, where drafts take precedence over published content. Set it through StartInstanceArgs.perspective; child instances inherit it.
Engine-owned instance and definition documents, and system.release
documents, always read under raw.
OptionalpinnedContent fingerprint of the pinned definition version (see hashDefinitionContent). Pinned alongside the version so a consumer can detect a deployed definition that drifted from what this instance started on. Advisory — the engine enforces nothing; this enables detection, not prevention. Absent when the instance was started against a definition deployed before content-addressing (it had no hash to pin).
OptionalprocessedIdempotency ledger — see ProcessedRequest. Optional because
instances persisted before the ledger existed lack it (any commit
materialises it, empty). Only keyed operations add rows — it never
grows on instances whose callers pass no idempotencyKey.
Per-stage instance entries — one StageEntry per stage the instance
has been in, in entry order. Past stages persist with exitedAt
set; the current stage is the entry whose exitedAt is undefined.
Each entry owns its activities.
OptionalsubworkflowsWorkflow-scope registry of every child this instance ever spawned;
see SubworkflowEntry. Rows are never deleted; a row without
resolved is a live child (watched, hydrated, propagating), one with
it is terminal, and a live row with abortPending is condemned — the
cascade owes it an abort. Rendered as the $subworkflows condition
var. Absent only on instances persisted before the registry existed.
Engine-scope environment partition stamped on the instance at create
time. Reads are scoped to a single tag, so an engine only sees
instances whose tag equals its own.
The Sanity resource this instance lives in. Stored on the doc so
any internal operation can mint GDRs for ancestors / spawned
children / etc. without re-supplying it. Mirrors
@sanity/client's ClientConfigResource.
Set (to the same instant as
completedAt) when the instance was hard-stopped viaabortInstancerather than reaching a terminal stage.completedAtis always stamped alongside it so every "in-flight" query (!defined(completedAt)) treats aborted and completed instances uniformly; this field is what distinguishes them.