Creates a workflow instance based on the specified configurations, such as a data backfill workflow instance.
Operation description
DataWorks Basic Edition or later is required.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:CreateWorkflowInstances |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The project ID. |
100 |
| EnvType |
string |
No |
The project environment. Valid values:
Valid values:
|
Prod |
| WorkflowId |
integer |
Yes |
The ID of the workflow to which the task belongs. The WorkflowId of a periodic task is always 1. |
1 |
| Name |
string |
Yes |
The name. |
WorkflowInstance1 |
| Periods |
object |
No |
The data backfill period settings. |
|
| BizDates |
array<object> |
Yes |
The list of business dates. You can specify multiple business date ranges, up to a maximum of 7 ranges. |
|
|
object |
No |
|||
| StartBizDate |
string |
Yes |
The start business date. Format: |
2024-11-20 |
| EndBizDate |
string |
Yes |
The end business date. Format: |
2024-11-24 |
| StartTime |
string |
No |
The start time of the period. Format: If you specify this field, you must also specify the EndTime field. |
00:00:00 |
| EndTime |
string |
No |
The end time of the period. Format: If you specify this field, you must also specify the StartTime field. |
23:59:59 |
| Type |
string |
Yes |
The type of the workflow instance. Valid values:
Valid values:
|
SupplementData |
| WorkflowParameters |
string |
No |
The workflow parameters. This parameter takes effect only when a specific workflow is specified (WorkflowId != 1). For a periodic workflow or a trigger-based workflow, the format is key=value, and the priority is lower than that of task parameters. For a manual workflow, the format is JSON, and the priority is higher than that of task parameters. |
"key=value" format: key1=value1 key2=value2 JSON format: {"key1":"value1", "key2": "value2"} |
| TaskParameters |
string |
No |
The task parameters. You can use this parameter to set parameters for specific tasks. The value is in JSON format. The key is the task ID. For the format of the value, refer to the task script parameters (Task.Script.Parameter in the response of the GetTask operation). |
{ "1001": "key1=val2 key2=val2", "1002": "key1=val2 key2=val2" } |
| AutoStartEnabled |
boolean |
No |
Specifies whether to run the instance immediately after it is created. Default value: true. |
true |
| DefaultRunProperties |
object |
No |
The runtime configurations. |
|
| RootTaskIds |
array |
No |
The list of root task IDs.
|
|
|
integer |
No |
The task ID. |
1234 |
|
| IncludeTaskIds |
array |
No |
The list of task IDs to be run. |
|
|
integer |
No |
The task ID. |
1234 |
|
| ExcludeTaskIds |
array |
No |
The list of task IDs not to be run. |
|
|
integer |
No |
The task ID. |
4321 |
|
| IncludeProjectIds |
array |
No |
The list of project IDs to be run. |
|
|
integer |
No |
The project ID. |
100 |
|
| ExcludeProjectIds |
array |
No |
The list of project IDs not to be run. |
|
|
integer |
No |
The project ID. |
200 |
|
| Mode |
string |
No |
The data backfill mode. Default value: ManualSelection. This parameter is required when Type is set to SupplementData. Valid values:
Valid values:
|
ManualSelection |
| Analysis |
object |
No |
The analysis configurations. This parameter is required when Type is set to SupplementData. |
|
| Enabled |
boolean |
No |
Specifies whether to enable analysis. This parameter is required when Type is set to SupplementData. |
true |
| Blocked |
boolean |
No |
Specifies whether to block the run if the analysis fails. This parameter is required when Type is set to SupplementData. |
true |
| RunPolicy |
object |
No |
The run policy. If this field is left empty, the task configuration is used. |
|
| StartTime |
string |
No |
The start time of the run. Format: |
00:00:00 |
| EndTime |
string |
No |
The end time of the run. Format: |
23:59:59 |
| Type |
string |
No |
The period type. This field is required if you configure a run policy. Valid values:
Valid values:
|
Daily |
| Immediately |
boolean |
No |
Specifies whether the run can be started immediately if the scheduled run time is in the future. Default value: false. |
false |
| Alert |
object |
No |
The alert configurations. |
|
| Type |
string |
No |
The alert policy. Valid values:
Valid values:
|
Succes |
| NoticeType |
string |
No |
The notification method. Valid values:
Valid values:
|
Sms |
| Parallelism |
integer |
No |
The number of parallel tasks. A value from 2 to 10 indicates the parallelism. A value of 1 indicates serial execution. This parameter is required when Type is set to SupplementData. |
2 |
| Order |
string |
No |
The run order. Default value: Asc. Valid values:
Valid values:
|
Asc |
| RuntimeResource |
string |
No |
The identifier of the custom scheduling resource group. If this field is left empty, the task configuration is used. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Priority |
integer |
No |
The run priority. Valid values: 1 to 11. A larger value indicates a higher priority. These parameter settings are supported only for manual workflows and trigger-based workflows. |
1 |
| PriorityWeightStrategy |
string |
No |
The priority weight policy. These parameter settings are supported only for manual workflows and trigger-based workflows. Valid values:
Valid values:
|
Upstream |
| Comment |
string |
No |
The reason for creation. |
create for test |
| Tags |
array<object> |
No |
The list of task tags. |
|
|
object |
No |
|||
| Value |
string |
No |
The tag value. |
tagValue |
| Key |
string |
No |
The tag key. |
tagKey |
| TagCreationPolicy |
string |
No |
The tag creation policy.
Valid values:
|
Append |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. You can use this ID to locate logs and troubleshoot issues. |
22C97E95-F023-56B5-8852-B1A77A17XXXX |
| OperationId |
string |
The operation ID. You can use this field to query the result of the creation operation by calling the GetCreateWorkflowInstancesResult API operation. |
e15ad21c-b0e9-4792-8f55-b037xxxxxxxx |
Examples
Success response
JSON format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77A17XXXX",
"OperationId": "e15ad21c-b0e9-4792-8f55-b037xxxxxxxx"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.