GetProcessInstance

Updated at:

Retrieves details for a specified approval process instance, including its approval nodes and task list.

Operation description

Request description

By providing the approval process instance ID, you can query all related information about the instance, such as the approval process definition, approval nodes in the current state, and details of approval tasks on each node. This API operation is primarily used to monitor and manage the status of approval processes.

Before you begin

Before calling this API operation, you must activate DataWorks and have the permissions to view the target approval ticket. If the approval ticket involves a workspace, make sure that the calling account has been added to the corresponding workspace.

You can obtain the ProcessInstanceId required for this API operation from the following sources:

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

dataworks:GetProcessInstance

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProcessInstanceId

string

Yes

The process instance ID.

332066440109224007

Response elements

Element

Type

Description

Example

object

The returned data.

RequestId

string

The request ID. Use this ID to locate logs and troubleshoot issues.

0bc5df3a17****903790e8e8a

ProcessInstance

object

Details of the approval process instance.

Id

string

The ID of the process instance.

332066440109224007

Title

string

The name of the process instance.

MaxCompute table access request

Status

string

The status of the process instance. Valid values:

  • Completed: Approved.

  • Running: Under approval.

  • Aborted: Withdrawn.

Valid values:

  • running :

    running

  • aborted :

    aborted

  • completed :

    completed

completed

Applicator

string

The user ID of the applicant.

1107558004253538

ApplicatorName

string

The Alibaba Cloud account name of the applicant.

test_account

StartTime

any

The time when the application was initiated.

2026-05-25 10:20:18 CST

Reason

string

The reason for the request.

Business need

AuthErrorMessage

string

The authorization failure message.

Note: This parameter is returned only if the authorization fails.

S-400007:ODPS acl auth failed. odps table acl auth failed

ApprovalTasks

array<object>

The approval tasks.

array<object>

An approval task.

Id

string

The approval task ID.

task_001

Status

string

The status of the task. Valid values:

  • Completed: The task is complete.

  • Pending: The task is pending.

  • Aborted: The task is aborted.

Valid values:

  • Completed :

    Completed

  • Aborted :

    Aborted

  • Pending :

    Pending

Aborted

ApprovalComment

string

The approval comment.

Approved

Assignee

string

The user ID of the actual approver.

207947399706614297

AssigneeName

string

The name of the actual approver.

Li Si

ApprovalDecision

string

The approval decision. Valid values:

  • Agree

  • Deny

Valid values:

  • deny :

    deny

  • agree :

    agree

Deny

CreateTime

integer

The time when the task was created.

The value is a 13-digit number, such as 1715587200000.

1715587200000

CompleteTime

integer

The time when the task was completed.

The value is a 13-digit number, such as 1715590800000.

1715590800000

ApprovalNode

object

The approval node from the corresponding approval policy.

Id

string

The node ID.

7a809b6a-2a62-4c6c-9c23-c2a145e3877d

Name

string

The node name.

default-name

AccountType

string

The type of the approver for the node. Valid values:

  • DataWorksProjectRole: workspace role

  • DataWorksProjectMember: workspace member

  • TableAdministrator: table owner

  • TableOrProjectAdministrator: table or workspace administrator

  • AliyunResourceOwner: Alibaba Cloud account

  • MaxComputeRole: MaxCompute role

  • DLFAdmin: DlfLegacy administrator

  • DLFNextAdmin: DLFNext administrator

  • TenantRole: tenant role

  • EmrAdministrator: EMR administrator

  • LindormAdministrator: Lindorm administrator

  • AliyunRamUser: RAM user

Valid values:

  • AliyunResourceOwner :

    Alibaba Cloud account

  • MaxComputeRole :

    MaxCompute role

  • DLFNextAdmin :

    DLFNext administrator

  • TenantRole :

    Tenant role

  • DataWorksProjectRole :

    Workspace role

  • AliyunRamUser :

    RAM user

  • EmrAdministrator :

    EMR administrator.

  • TableOrProjectAdministrator :

    Table or workspace administrator.

  • TableAdministrator :

    Table owner.

  • DLFAdmin :

    DlfLegacy administrator

  • DataWorksProjectMember :

    Workspace member

  • LindormAdministrator :

    Lindorm administrator

DataWorksProjectRole

Assignees

array

The specified approvers.

The contents of this parameter depend on the AccountType value:

  • If AccountType is DataWorksProjectMember, this parameter contains the user IDs of workspace members.

  • If AccountType is DataWorksProjectRole, this parameter contains the codes of workspace roles.

  • If AccountType is MaxComputeRole, this parameter contains the MaxCompute roles.

  • If AccountType is TenantRole, this parameter contains the codes of tenant roles.

  • If AccountType is AliyunRamUser, this parameter contains the user IDs of RAM users.

string

An approver.

role_project_admin

TaskCandidates

array<object>

The candidate approvers for the task.

object

A candidate approver.

MemberUserId

string

The user ID of the approver.

207947397776614297

MemberName

string

The name of the approver.

Li Si

ApprovalProcessDefinition

object

The approval policy applied to this process instance.

Id

string

The approval policy ID.

323861511451222099

Name

string

The approval policy name.

SYSTEM_GENERATE_DEFAULT

Description

string

The description of the approval policy.

Process definition description

Type

string

The type of the approval policy. Valid values:

  • MaxCompute

  • DataService

  • DlfV1 (Custom creation is not supported)

  • Extension

  • Hologres

  • Emr (Custom creation is not supported)

  • DataAssetGovernance (Custom creation is not supported)

  • Lindorm (Custom creation is not supported)

  • StarRocks (Custom creation is not supported)

  • DlfNext (Custom creation is not supported)

  • DataWorks (Custom creation is not supported)

MaxCompute

SubType

string

The subtype of the approval policy. Valid values:

  • Table

  • Column

  • Database

  • Schema

  • Default

Table

Enabled

boolean

Indicates whether the policy is enabled.

true

RuleConditions

array<object>

The rules that determine when the approval policy takes effect.

object

A rule that determines when the approval policy takes effect.

Type

string

The type of the rule condition. Valid values:

  • odpsProject: Applies to a specific MaxCompute project.

  • hologresInstanceId: Applies to a specific Hologres instance.

  • sensibleLevel: Applies to a specific security level.

  • tableGuid: Applies to a specific table.

  • projectId: Applies to a specific workspace.

Valid values:

  • tableGuid :

    tableGuid

  • hologresInstanceId :

    hologresInstanceId

  • sensibleLevel :

    sensibleLevel

  • odpsProject :

    odpsProject

  • projectId :

    projectId

odpsProject

Expression

string

The conditional expression for the policy to take effect, such as ((#type=='typeValue')).

((#odpsProject=='PX_BEIJING_TEST'))

Scope

string

The rule scope. Valid values:

  • Deployment: Determines whether the policy applies when a request is submitted.

  • Running: Determines whether to skip approval while the process instance runs. This value is supported only for MaxCompute approval policies.

Valid values:

  • Running :

    Skip approval while the process instance runs.

  • Deployment :

    Takes effect when a request is triggered.

Deployment

NotificationServices

array<object>

The notification services.

object

A notification service.

Channel

string

The notification channel. Valid values:

  • Mail

  • Sms

  • DingRobot

  • Weixin

Valid values:

  • Mail :

    Email

  • Weixin :

    A webhook

  • Sms :

    SMS

  • DingRobot :

    DingTalk chatbot

Mail

Extension

string

Additional information in JSON format. For example, {"atAll":"true"} indicates whether to @all members.

{"atAll":"true"}

Receiver

string

If Channel is set to DingRobot or Weixin, the value of this parameter must be the webhook URL.

https://dingtalk

ApprovalNodes

array<object>

The approval nodes.

object

An approval node.

Id

string

The node ID.

7a809b6a-2a62-4c6c-9c23-c2a145e3877d

Name

string

The node name.

default-name

AccountType

string

The type of the approver for the node. Valid values:

  • DataWorksProjectRole: workspace role

  • DataWorksProjectMember: workspace member

  • TableAdministrator: table owner

  • TableOrProjectAdministrator: table or workspace administrator

  • AliyunResourceOwner: Alibaba Cloud account

  • MaxComputeRole: MaxCompute role

  • DLFAdmin: DlfLegacy administrator

  • DLFNextAdmin: DLFNext administrator

  • TenantRole: tenant role

  • EmrAdministrator: EMR administrator

  • LindormAdministrator: Lindorm administrator

  • AliyunRamUser: RAM user

DataWorksProjectRole

Assignees

array

The specified approvers.

The contents of this parameter depend on the AccountType value:

  • If AccountType is DataWorksProjectMember, this parameter contains the user IDs of workspace members.

  • If AccountType is DataWorksProjectRole, this parameter contains the codes of workspace roles.

  • If AccountType is MaxComputeRole, this parameter contains the MaxCompute roles.

  • If AccountType is TenantRole, this parameter contains the codes of tenant roles.

  • If AccountType is AliyunRamUser, this parameter contains the user IDs of RAM users.

string

An approver.

role_project_admin

ExtensionProperties

string

The extended description of the approval node.

none

Examples

Success response

JSON format

{
  "RequestId": "0bc5df3a17****903790e8e8a",
  "ProcessInstance": {
    "Id": "332066440109224007",
    "Title": "MaxCompute table permission application",
    "Status": "completed",
    "Applicator": "1107558004253538",
    "ApplicatorName": "test_account",
    "StartTime": "2026-05-25 10:20:18 CST",
    "Reason": "Business requirement",
    "AuthErrorMessage": "S-400007:ODPS acl auth failed. odps table acl auth failed",
    "ApprovalTasks": [
      {
        "Id": "task_001",
        "Status": "Aborted",
        "ApprovalComment": "Approved",
        "Assignee": "207947399706614297",
        "AssigneeName": "Li Si",
        "ApprovalDecision": "Deny",
        "CreateTime": 1715587200000,
        "CompleteTime": 1715590800000,
        "ApprovalNode": {
          "Id": "7a809b6a-2a62-4c6c-9c23-c2a145e3877d",
          "Name": "default-name",
          "AccountType": "DataWorksProjectRole",
          "Assignees": [
            "role_project_admin"
          ]
        },
        "TaskCandidates": [
          {
            "MemberUserId": "207947397776614297",
            "MemberName": "Li Si"
          }
        ]
      }
    ],
    "ApprovalProcessDefinition": {
      "Id": "323861511451222099",
      "Name": "SYSTEM_GENERATE_DEFAULT",
      "Description": "Approval policy description",
      "Type": "MaxCompute",
      "SubType": "Table",
      "Enabled": true,
      "RuleConditions": [
        {
          "Type": "odpsProject",
          "Expression": "((#odpsProject=='PX_BEIJING_TEST'))",
          "Scope": "Deployment"
        }
      ],
      "NotificationServices": [
        {
          "Channel": "Mail",
          "Extension": "{\"atAll\":\"true\"}",
          "Receiver": "https://dingtalk"
        }
      ],
      "ApprovalNodes": [
        {
          "Id": "7a809b6a-2a62-4c6c-9c23-c2a145e3877d",
          "Name": "default-name",
          "AccountType": "DataWorksProjectRole",
          "Assignees": [
            "role_project_admin"
          ],
          "ExtensionProperties": "none"
        }
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.