Skip to main content

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​

ParameterTypeRequiredDescription
workflowIdStringYesID of the workflow task to update. Use data from Create a Workflow Task, or use data[].workflowId from List Workflow Tasks.
bizDataObjectYesComplete updated SQL task business data. See the SQL task parameters in Create a Workflow Task.
sourceStringNoSource identifier supplied by the caller to describe its request channel. The API does not define a fixed value.
toolIdStringNoID of the tool making the call. The API does not define an ID format; omit it if the caller has no corresponding tool ID.
sourceClientStringNoName or identifier of the client making the request. The API does not define a fixed format.
sourceSessionIdStringNoExternal session ID from the caller. Omit it if the caller has no session ID.
skillVersionStringNoVersion identifier of the calling skill or tool. The caller defines the format.
languageStringNoLanguage 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​

ParameterTypeDescription
successBooleanWhether the request was successful.
requestIdStringOpenAPI request ID.
data.workflowIdStringWorkflow task ID.
data.operationStringOperation type; fixed to update.
data.acceptedBooleanWhether the update request was accepted.
messageStringError 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.