Sanity Library Reference Docs
    Preparing search index...
    • 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.

      Parameters

      Returns Engine