自动化接口
提供通过自定义代码执行自动化的能力。
基本用法
IAutomationManager 接口对象通过 Engine 对象获取,在表单后台的自定义代码界面可以通过以下方式调用 IAutomationManager 的任何方法。
this.Engine.AutomationManager.ExecuteAutomation(参数);
接口列表
执行自动化
功能描述
执行自动化
接口定义
public void ExecuteAutomation(string schemaCode,
string automationCode,
string[] bizObjectIds,
Dictionary<string, object> customParameterValueMap)
请求参数
| 参数名称 | 是否必填 | 类型 | 描述 |
|---|---|---|---|
schemaCode |
是 | string | 自动化归属的表单编码 |
automationCode |
是 | string | 自定义编码,自定义触发事件的自动化,在开启开发模式时可以获取。 |
bizObjectIds |
是 | string[] | 触发自动化的业务数据 ID 数组。 必须为自动化归属的表单编码对应的业务数据ID. |
customParameterValueMap |
否 | Dictionary |
自定义参数,根据设定的参数按需传值。 |
返回值
| 类型 | 描述 |
|---|---|
| 无 |
示例
const string AutomationCode_StartTask = "A20260304152032";
const string schemaCode_automation = "D000183cc66ce3d437c41c8983fd26b3e1256ad";
string[] bizObjectIds = new string[1];
bizObjectIds[0] = "66de6fcc-bfea-4aec-adfd-064d7965e22e";
//自定义参数赋值
Dictionary<string, object> customParams = new Dictionary<string, object>();
customParams["cParam1"] = "文本参数";
customParams["cParam2"] = 2;
this.Engine.AutomationManager.ExecuteAutomation(schemaCode_automation,
AutomationCode_StartTask,
bizObjectIds,
customParams);