DataWorks MCP Server

Official

CreateWorkflowInstances

Initiate and configure workflow instances on DataWorks MCP Server. Set parameters, define run schedules, and manage task execution for workflows like data supplementation, manual tasks, and smoke tests.

Instructions

创建工作流实例 *此Tool有MCP Resource,请查看CreateWorkflowInstances(MCP Resource)获取更多使用此Tool的示例详情。

Input Schema

NameRequiredDescriptionDefault
AutoStartEnabledNo创建后是否直接运行,默认为true
CommentNo创建的原因说明
DefaultRunPropertiesNo运行时配置
EnvTypeNo项目环境。- Prod:生产- Dev:开发
NameYes名称
PeriodsNo补数据周期设置
ProjectIdNo项目ID
TaskParametersNo任务参数,为特定任务设置参数。JSON格式,key为任务ID,value的格式参考任务脚本参数(GetTask接口的结果Task.Script.Parameter)
TypeYes工作流实例的类型。- SupplementData:补数据。RootTaskIds与IncludeTaskIds的填写方法随补数据模式而变化,见DefaultRunProperties.Mode参数说明- ManualWorkflow:手动工作流。WorkflowId需要填手动业务流程的WorkflowId,RootTaskIds选填,不填则会使用手动业务流程默认的根节点列表。- Manual:手动任务。仅需填RootTaskIds,即为要运行的手动任务列表。- SmokeTest:冒烟测试。仅需填RootTaskIds,即为要运行的测试任务列表
WorkflowIdNo所属工作流的ID。周期任务的WorkflowId均为1
WorkflowParametersNo工作流参数,优先级高于任务参数。格式参考任务脚本参数(GetTask接口的结果Task.Script.Parameter)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "AutoStartEnabled": { "description": "创建后是否直接运行,默认为true", "type": "boolean" }, "Comment": { "description": "创建的原因说明", "type": "string" }, "DefaultRunProperties": { "additionalProperties": false, "description": "运行时配置", "properties": { "Alert": { "additionalProperties": false, "description": "报警配置", "properties": { "NoticeType": { "description": "通知方式。- Sms:仅短信- Mail:仅邮件- SmsMail:短信加邮件", "type": "string" }, "Type": { "description": "报警策略。-Success成功告警-Failure失败告警-SuccessFailure成功和失败都告警", "type": "string" } }, "type": "object" }, "Analysis": { "additionalProperties": false, "description": "分析配置。Type=SupplementData时必填", "properties": { "Blocked": { "description": "分析不通过的情况下是否阻塞运行。Type=SupplementData时必填", "type": "boolean" }, "Enabled": { "description": "是否开启分析。Type=SupplementData时必填", "type": "boolean" } }, "type": "object" }, "ExcludeProjectIds": { "description": "不需要运行的项目ID列表", "type": "array" }, "ExcludeTaskIds": { "description": "不要运行的任务ID列表", "type": "array" }, "IncludeProjectIds": { "description": "需要运行的项目ID列表", "type": "array" }, "IncludeTaskIds": { "description": "需要运行的任务ID列表", "type": "array" }, "Mode": { "description": "补数据模式,默认为ManualSelection。Type=SupplementData时必填。- General:普通模式,`RootTaskIds`仅能填一个,`IncludeTaskIds`选填,不填会默认包含`RootTaskIds`中的内容- ManualSelection:手动选择,`RootTaskIds`能填多个,`IncludeTaskIds`选填,不填会默认包含`RootTaskIds`中的内容- Chain:链路,`RootTaskIds`为空,`IncludeTaskIds`填两个id,分别是起始和结束任务- AllDownstream:所有下游,`RootTaskIds`仅能填一个", "type": "string" }, "Order": { "description": "运行顺序,默认为Asc。- Asc:按业务日期升序。- Desc:按业务日期降序", "type": "string" }, "Parallelism": { "description": "任务并行数。取值2~10时为并行度,取值1时为串行。Type=SupplementData时必填" }, "RootTaskIds": { "description": "根任务ID列表。- Type=SupplementData时。除Mode=Chain的情况外,RootTaskIds均必填。- Type=ManualWorkflow时。RootTaskIds选填,不填则会使用手动业务流程默认的根节点列表。- Type=Manual时。RootTaskIds必填,即为要运行的手动任务列表。- Type=SmokeTest时:RootTaskIds必填,即为要运行的测试任务列表", "type": "array" }, "RunPolicy": { "additionalProperties": false, "description": "运行策略。该字段为空则跟随任务配置", "properties": { "EndTime": { "description": "结束运行时间,格式为`hh:mm:ss`,24小时制。若设置运行策略,此字段必填", "type": "string" }, "Immediately": { "description": "运行时间在未来是否可以立即运行起来,默认为false", "type": "boolean" }, "StartTime": { "description": "开始运行时间,格式为`hh:mm:ss`,24小时制。若设置运行策略,此字段必填", "type": "string" }, "Type": { "description": "时段类型。若设置运行策略,此字段必填。- Daily:每天- Weekend:仅周末", "type": "string" } }, "type": "object" }, "RuntimeResource": { "description": "自定义调度资源组标识符,该字段为空则跟随任务配置", "type": "string" } }, "type": "object" }, "EnvType": { "description": "项目环境。- Prod:生产- Dev:开发", "type": "string" }, "Name": { "description": "名称", "type": "string" }, "Periods": { "additionalProperties": false, "description": "补数据周期设置", "properties": { "BizDates": { "description": "业务日期列表。可指定多段业务日期(最多7段)", "items": { "additionalProperties": false, "properties": { "EndBizDate": { "description": "结束业务日期。格式为`yyyy-mm-dd`", "type": "string" }, "StartBizDate": { "description": "起始业务日期。格式为`yyyy-mm-dd`", "type": "string" } }, "required": [ "StartBizDate", "EndBizDate" ], "type": "object" }, "type": "array" }, "EndTime": { "description": "指定结束周期时间,格式为`hh:mm:ss`,24小时制,默认23:59:59。如果填写此字段需要StartTime与EndTime需要同时填写", "type": "string" }, "StartTime": { "description": "指定开始周期时间,格式为`hh:mm:ss`,24小时制,默认00:00:00。如果填写此字段需要StartTime与EndTime需要同时填写", "type": "string" } }, "required": [ "BizDates" ], "type": "object" }, "ProjectId": { "description": "项目ID" }, "TaskParameters": { "description": "任务参数,为特定任务设置参数。JSON格式,key为任务ID,value的格式参考任务脚本参数(GetTask接口的结果Task.Script.Parameter)", "type": "string" }, "Type": { "description": "工作流实例的类型。- SupplementData:补数据。RootTaskIds与IncludeTaskIds的填写方法随补数据模式而变化,见DefaultRunProperties.Mode参数说明- ManualWorkflow:手动工作流。WorkflowId需要填手动业务流程的WorkflowId,RootTaskIds选填,不填则会使用手动业务流程默认的根节点列表。- Manual:手动任务。仅需填RootTaskIds,即为要运行的手动任务列表。- SmokeTest:冒烟测试。仅需填RootTaskIds,即为要运行的测试任务列表", "type": "string" }, "WorkflowId": { "description": "所属工作流的ID。周期任务的WorkflowId均为1" }, "WorkflowParameters": { "description": "工作流参数,优先级高于任务参数。格式参考任务脚本参数(GetTask接口的结果Task.Script.Parameter)", "type": "string" } }, "required": [ "Name", "Type" ], "type": "object" }

You must be authenticated.

Other Tools from DataWorks MCP Server

Related Tools

ID: 5xvvskonjr