UNPKG

@tachybase/module-workflow

Version:

A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.

18 lines (17 loc) 798 B
import { Database, Transactionable } from '@tego/server'; import PluginWorkflowServer from './Plugin'; import { WorkflowModel } from './types'; export declare function toJSON(data: any): any; /** * 触发工作流并获取新创建的执行记录 * @param plugin 工作流插件实例 * @param workflow 工作流模型 * @param context 触发上下文 * @param options 选项(包含 httpContext, transaction 等) * @param db 数据库实例(用于查询执行记录) * @returns 新创建的执行记录,如果创建失败则返回 null */ export declare function triggerWorkflowAndGetExecution(plugin: PluginWorkflowServer, workflow: WorkflowModel, context: object, options: { httpContext?: any; transaction?: any; } & Transactionable, db: Database): Promise<any | null>;