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.
Workflow-level resolved field entries.
Populated from the workflow definition's fields[] declarations plus
the caller-supplied initialFields at startInstance. Persists for
the lifetime of the instance.
To declare "the subject document of this workflow", add a
{ type: "doc.ref", name: "subject", initialValue: { type: "input" } }
entry to the workflow definition. Conditions then read it as
$fields.subject. There is no other subject mechanism.
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).
OptionalperspectiveOptional perspective applied to field-entry query reads and spawn
forEach.groq discovery. When unset the engine treats reads as
"raw" (no filtering). Set at startInstance time to scope a
workflow's reads to a Content Release stack (e.g. [releaseName]
or [releaseName, "drafts"]).
Engine-internal reads of instance / definition documents are always raw, regardless of this field.
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.