Skip to main content

Function: recordDefinitionVersion()

recordDefinitionVersion(workflow, deps): Promise<string | null>

Defined in: packages/workflow-engine/src/kernel/helpers/definition-pinning.ts:45

Records the structural snapshot of workflow and returns the version to stamp on a new run, or null on a database whose schema predates definition versioning (in which case runs stay unpinned and every host can serve them, exactly as before).

Throws DefinitionVersionConflictError when an explicit version is re-registered with a different structure — the one failure mode manual versioning has that derived versions do not.

Parameters​

workflow​

Workflow<any, any>

deps​

KernelDeps

Returns​

Promise<string | null>