Update a Workflow Task
Update the business data of an existing SQL task and restart the workflow mainline. Send the complete bizData structure used when creating the SQL task.
For an SQL task, withdraw the task before calling this API. Calling it in another state returns 只有撤回状态才能操作. After a successful update, the SQL task returns to the pending submission state. Verify workflowId and the complete business data before calling this API.
Request URL: /openapi/v1/workflow/update
Request method: POST
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workflowId | String | Yes | ID of the workflow task to update. Use data from Create a Workflow Task, or use data[].workflowId from List Workflow Tasks. |
bizData | Object | Yes | Complete updated SQL task business data. See the SQL task parameters in Create a Workflow Task. |
source | String | No | Source identifier supplied by the caller to describe its request channel. The API does not define a fixed value. |
toolId | String | No | ID of the tool making the call. The API does not define an ID format; omit it if the caller has no corresponding tool ID. |
sourceClient | String | No | Name or identifier of the client making the request. The API does not define a fixed format. |
sourceSessionId | String | No | External session ID from the caller. Omit it if the caller has no session ID. |
skillVersion | String | No | Version identifier of the calling skill or tool. The caller defines the format. |
language | String | No | Language for response messages. The API definition does not list fixed enum values; omit it if the accepted value is unknown. |
These caller context fields are optional. The API definition does not list fixed enums or formats for them. Pass them only when the caller has the corresponding information; otherwise, omit them.
Response parameters
| Parameter | Type | Description |
|---|---|---|
success | Boolean | Whether the request was successful. |
requestId | String | OpenAPI request ID. |
data.workflowId | String | Workflow task ID. |
data.operation | String | Operation type; fixed to update. |
data.accepted | Boolean | Whether the update request was accepted. |
message | String | Error message when the request fails. |
Successful response example (SQL task)
{
"requestId": "Io0p8GDK-JPRNvVFnPIKf7QDdQRs1YVA",
"success": true,
"data": {
"workflowId": "st-dn56nen5ltef",
"operation": "update",
"accepted": true
}
}
Failed response example
When workflowId does not identify an existing task, the API returns:
{
"requestId": "Cg2e6NEA-HNPLeTVnMPPg4DIdHLv3ZUI",
"success": false,
"message": "未找到对应工单"
}
The message value is shown exactly as returned by the API.