Create an engine for one workflow environment. The supplied client's token
identifies the actor; keep its authentication unchanged for the engine's
lifetime. executionContext adds an advisory host label to history entries.
Field values supplied at runtime may reference only the addressed workflow
resource. References to other resources throw RefResourceUndeclaredError when
written. Reads can reach other resources through derived sibling clients,
but this helper does not declare those resources for reference writes.
To accept foreign references, construct an engine with createEngine from
@sanity/workflow-engine and supply a resourceClients resolver, then return
that engine from the context callback passed to registerWorkflowTools.
Create an engine for one workflow environment. The supplied client's token identifies the actor; keep its authentication unchanged for the engine's lifetime.
executionContextadds an advisory host label to history entries.Field values supplied at runtime may reference only the addressed workflow resource. References to other resources throw
RefResourceUndeclaredErrorwhen written. Reads can reach other resources through derived sibling clients, but this helper does not declare those resources for reference writes. To accept foreign references, construct an engine withcreateEnginefrom@sanity/workflow-engineand supply aresourceClientsresolver, then return that engine from the context callback passed to registerWorkflowTools.