All Products
Search
Document Center

ApsaraVideo VOD:Workflow task completion

Last Updated:Jan 28, 2026

This topic describes the workflow task completion event, the content of the event notification, and a callback example.

Event type

WorkflowTaskComplete

Event description

This event is triggered when all tasks in a workflow are complete. This event applies only to new versions of workflows.

Event content

Parameter name

Type

Required

Description

EventType

String

Yes

The event type. The value is fixed to WorkflowTaskComplete.

EventTime

String

Yes

The time when the event occurred. The time is in UTC format: yyyy-MM-ddTHH:mm:ssZ.

WorkflowId

String

Yes

The workflow ID.

Status

String

Yes

The status of the workflow task.

  • Succeed: The task was successful.

  • Failed: The task failed.

VideoId

String

Yes

The video ID.

TaskId

String

Yes

The task ID.

ActivityResults

String

Yes

The details of the task node results. This is a JSON string. For more information, see the field description below.

TaskInput

String

Yes

The input information for the task. This is a JSON string. For more information, see the field description below.

CreateTime

String

Yes

The time when the task was created. The time is in UTC format: yyyy-MM-ddTHH:mm:ssZ.

ModifiedTime

String

Yes

The time when the task was last updated. The time is in UTC format: yyyy-MM-ddTHH:mm:ssZ.

FinishTime

String

Yes

The time when the task was completed. The time is in UTC format: yyyy-MM-ddTHH:mm:ssZ.

UserId

String

Yes

The user ID.

ActivityResults is a JSON string that contains the execution status and result of each activity node in the workflow. Each key name (ActivityId) represents a specific workflow node instance, and its value contains the execution details of that node. The fields are described in the following table:

Name

Type

Required

Example

Status

String

Yes

Succeed

StartTime

String

Yes

2025-10-15T01:50:30Z

EndTime

String

Yes

2025-10-15T02:00:33Z

ActivityId

String

Yes

VideoTranslation

ActivityInstanceId

String

Yes

ce87026be902...

Result

JSONObject

Yes

{

"Status": "Finished",

"JobType": "VideoTranslation",

"MediaId": "b0e8xxx281ed0102",

"ModifiedTime": "2025-10-15T02:00:32Z",

"UserData": "{\"VodSrc\":\"Workflow\"}",

"CreateTime": "2025-10-15T01:50:30Z",

"JobId": "0f5daxxxx4e5897f147"

}

TaskInput is a JSON string that serves as the input data to trigger the workflow. It specifies the metadata and storage location of the media file to be processed. The fields are described in the following table:

Name

Type

Required

Example

Type

String

Yes

Media

Media

String

Yes

c066a7898e2c71f08b23752281edxxxx

Title

String

Yes

title-sample.mp4

StorageLocation

String

Yes

sample-bucket.oss-cn-shanghai.aliyuncs.com

Callback example

Notes on the callback example:

  • For HTTP callbacks, the following content is the body of the HTTP POST request.

  • For MNS callbacks, the following content is the body of the message.

{
  "Status": "Succeed",
  "TaskId": "xxx",
  "VideoId": "xxx",
  "ActivityResults":"{\"VodSnapshot_53e77\":{\"ActivityId\":\"VodSnapshot\",\"ActivityInstanceId\":\"xxxx\",\"EndTime\":\"2025-04-01T02:29:50Z\",\"Result\":\"{\\\"RequestId\\\":\\\"xxx\\\",\\\"EventType\\\":\\\"SnapshotComplete\\\",\\\"UserId\\\":xxx,\\\"MessageBody\\\":{\\\"Status\\\":\\\"success\\\",\\\"VideoId\\\":\\\"xxx\\\",\\\"EventType\\\":\\\"SnapshotComplete\\\",\\\"EventTime\\\":\\\"2025-04-01T02:29:48Z\\\",\\\"TriggerSource\\\":\\\"{\\\\\\\"ActivityInstanceId\\\\\\\":\\\\\\\"xxx\\\\\\\",\\\\\\\"BizType\\\\\\\":\\\\\\\"ice-workflow\\\\\\\"}\\\"}}\",\"StartTime\":\"2025-04-01T02:29:46Z\",\"Status\":\"Succeed\"}}",
  "TaskInput": "{\"Type\":\"Media\",\"Media\":\"xxx\",\"Title\":\"xxx\",\"StorageLocation\":\"xxx\"}",
  "ModifiedTime": "2025-04-01T02:33:12Z",
  "FinishTime": "2025-04-01T02:33:12Z",
  "UserId": "xxx",
  "CreateTime": "2025-04-01T02:29:43Z",
  "WorkflowId": "xxx"
}