GetWorkflowTask

Updated at:

Queries a workflow task by task ID, including the workflow ID, workflow task status, and workflow task result. This operation only supports querying workflow task data from the past year.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:GetWorkflowTask

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TaskId

string

No

The workflow task ID.

******4215e042b3966ca5441e******

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

******0C-7870-15FE-B96F-8880BB******

WorkflowTask

object

The workflow task information.

TaskId

string

The workflow task ID.

******4215e042b3966ca5441e******

Status

string

The task status.

Valid values:

  • Init :

    Task initialization.

  • Failed :

    Failed.

  • Canceled :

    Canceled.

  • Processing :

    Processing.

  • Succeed :

    Succeeded.

Succeed

TaskInput

string

The workflow task input.

{ "Type": "Media", "Media": "******30706071edbfe290b488******" }

CreateTime

string

The task creation time. Format: yyyy-MM-ddTHH:mm:ssZ.

2023-01-04T02:05:17Z

FinishTime

string

The task completion time. Format: yyyy-MM-ddTHH:mm:ssZ.

2023-01-04T02:06:19Z

Workflow

object

The workflow information.

WorkflowId

string

The workflow ID.

******63dca94c609de02ac0d1******

Name

string

The workflow name.

Super-resolution transcoding workflow

Status

string

The workflow status.

Valid values:

  • Active :

    Active.

  • Inactive :

    Inactive.

Active

Type

string

The workflow type.

Valid values:

  • Customize :

    Custom workflow.

  • System :

    System workflow.

  • Common :

    User-created workflow.

Common

CreateTime

string

The workflow creation time. The time follows the ISO 8601 standard in UTC (ending with Z).

2022-11-27T10:02:12Z

ModifiedTime

string

The time when the workflow was last modified. The time follows the ISO 8601 standard in UTC (ending with Z).

2022-11-29T02:06:19Z

ActivityResults

string

The results of each node in the workflow task, in JSON format. The content varies based on the workflow configuration.

{"ActivityResults": "Success"}

UserData

string

The custom fields specified when the workflow task was submitted.

{"NotifyAddress":"http://xx.xx.xxx"}

Examples

Success response

JSON format

{
  "RequestId": "******0C-7870-15FE-B96F-8880BB******",
  "WorkflowTask": {
    "TaskId": "******4215e042b3966ca5441e******",
    "Status": "Succeed",
    "TaskInput": "{\n      \"Type\": \"Media\",\n      \"Media\": \"******30706071edbfe290b488******\"\n}",
    "CreateTime": "2023-01-04T02:05:17Z",
    "FinishTime": "2023-01-04T02:06:19Z",
    "Workflow": {
      "WorkflowId": "******63dca94c609de02ac0d1******",
      "Name": "Super-resolution transcoding workflow",
      "Status": "Active",
      "Type": "Common",
      "CreateTime": "2022-11-27T10:02:12Z",
      "ModifiedTime": "2022-11-29T02:06:19Z\n"
    },
    "ActivityResults": "{\"ActivityResults\": \"Success\"}",
    "UserData": "{\"NotifyAddress\":\"http://xx.xx.xxx\"}"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.