Skip to content

uni-flow 公开 API(中文注解)


uni-flow 公开 API(中文注解) / createWorkflowConfigFromDocument

Function: createWorkflowConfigFromDocument()

createWorkflowConfigFromDocument(doc, options?): Promise<{ config: WorkflowConfig; options?: WorkflowEngineOptions; }>

Defined in: yaml/loader.ts:150

将已校验的 Workflow YAML 文档物化为 WorkflowConfig(含 ControlFlow 与 Units)。 不启动运行;适合先拿配置再交给 createWorkflowEngine 或自定义包装。

Parameters

doc

WorkflowYamlDocument

通过 schema 校验的 WorkflowYamlDocument

options?

CreateEngineFromYamlOptions = {}

registry / bindings / engineOptions

Returns

Promise<{ config: WorkflowConfig; options?: WorkflowEngineOptions; }>

config 与合并后的引擎 options

MIT Licensed