Skip to content

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


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

Function: createWorkflowConfigFromYaml()

createWorkflowConfigFromYaml(source, options?): Promise<{ config: WorkflowConfig; options?: WorkflowEngineOptions; workflowId: string; }>

Defined in: yaml/loader.ts:268

从路径或 YAML 字符串构建配置(含 workflowId),不立即创建引擎。 Orchestrator registerFromYaml 等场景会复用本函数以便每次 run 拿到新 ControlFlow 游标。

Parameters

source

string

文件路径或 YAML 文本

options?

CreateEngineFromYamlOptions = {}

createEngineFromYaml

Returns

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

workflowIdconfig 与可选引擎 options

MIT Licensed