All Products
Search
Document Center

DataWorks:GetProcessInstance - GetProcessInstance

Last Updated:Jun 17, 2026

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

Operation description

Request

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

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ProcessInstanceId

string

Yes

The process instance ID.

332066440109224007

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID, which is used to locate logs and troubleshoot issues.

0bc5df3a17****903790e8e8a

ProcessInstance

object

The details of the approval process instance.

Id

string

The process instance ID.

332066440109224007

Title

string

The name of the process instance.

MaxCompute table permission request

Status

string

The status of the process instance. Valid values:

  • Completed: The approval is completed.

  • Running: The approval is in progress.

  • Aborted: The approval is withdrawn.

Valid values:

  • running :

    running

  • aborted :

    aborted

  • completed :

    completed

completed

Applicator

string

The UserId of the applicant.

1107558004253538

ApplicatorName

string

The Alibaba Cloud account name of the applicant.

test_account

StartTime

any

The time when the application was submitted.

2026-05-25 10:20:18 CST

Reason

string

The reason for the application.

Business requirement

AuthErrorMessage

string

The error message of authorization failure.

Note: This field is present only when authorization fails.

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

ApprovalTasks

array

The list of approval tasks.

array

The approval task.

Id

string

The approval task ID.

task_001

Status

string

The task status:

  • Completed: Completed.

  • Pending: Pending.

  • Aborted: Aborted.

Valid values:

  • Completed :

    Completed

  • Pending :

    Pending

  • Aborted :

    Aborted

Aborted

ApprovalComment

string

The approval comment.

Approved

Assignee

string

The UserId of the actual approver.

207947399706614297

AssigneeName

string

The name of the actual approver.

John

ApprovalDecision

string

The approval decision:

  • Agree

  • Deny

Valid values:

  • deny :

    deny

  • agree :

    agree

Deny

CreateTime

integer

The time when the task was created.

1715587200000

CompleteTime

integer

The time when the task was completed.

1715590800000

ApprovalNode

object

The approval node in the 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 node approver:

  • DataWorksProjectRole: Workspace role

  • DataWorksProjectMember: Workspace member

  • TableAdministrator: Table owner

  • TableOrProjectAdministrator: Table owner 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

  • TableOrProjectAdministrator :

    Table owner or workspace administrator

  • EmrAdministrator :

    EMR administrator

  • TableAdministrator :

    Table owner

  • DLFAdmin :

    DlfLegacy administrator

  • DataWorksProjectMember :

    Workspace member

  • LindormAdministrator :

    Lindorm administrator

DataWorksProjectRole

Assignees

array

The specified approvers.

When AccountType is set to different types, this field has different semantics:

  • DataWorksProjectMember: Specifies the UserId of a workspace member.

  • DataWorksProjectRole: Specifies the code of a workspace role.

  • MaxComputeRole: Specifies the MaxCompute role.

  • TenantRole: Specifies the code of a tenant role.

  • AliyunRamUser: Specifies the RAM userId.

string

The approver.

role_project_admin

TaskCandidates

array

The list of candidate approvers for the task.

object

The candidate approver.

MemberUserId

string

The UserId of the approver.

207947397776614297

MemberName

string

The name of the approver.

John

ApprovalProcessDefinition

object

The approval policy associated with the current process instance.

Id

string

The approval policy ID.

323861511451222099

Name

string

The name of the approval policy.

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 not supported)

  • Extension

  • Hologres

  • Emr (custom creation not supported)

  • DataAssetGovernance (custom creation not supported)

  • Lindorm (custom creation not supported)

  • StarRocks (custom creation not supported)

  • DlfNext (custom creation not supported)

  • DataWorks (custom creation not supported)

MaxCompute

SubType

string

The subtype of the approval policy:

  • Table

  • Column

  • Database

  • Schema

  • Default

Table

Enabled

boolean

Indicates whether the approval policy is enabled.

true

RuleConditions

array

The list of rule conditions for the approval policy.

object

The rule condition for the approval policy.

Type

string

The type of the rule condition:

  • odpsProject: Takes effect under a specified MaxCompute project.

  • hologresInstanceId: Takes effect under a specified Hologres instance.

  • sensibleLevel: Takes effect under a specified security level.

  • tableGuid: Takes effect under a specified table.

  • projectId: Takes effect under a specified workspace ID.

Valid values:

  • tableGuid :

    tableGuid

  • hologresInstanceId :

    hologresInstanceId

  • sensibleLevel :

    sensibleLevel

  • odpsProject :

    odpsProject

  • projectId :

    projectId

odpsProject

Expression

string

The expression for the rule condition. Format: ((#type=='typeValue')).

((#odpsProject=='PX_BEIJING_TEST'))

Scope

string

The scope in which the rule takes effect:

  • Deployment: Used to determine whether the approval policy matches when a request is submitted.

  • Running: Used to determine whether approval is exempted during the approval process execution (only supported for MaxCompute type).

Valid values:

  • Running :

    Approval exemption during process instance execution

  • Deployment :

    Takes effect when a request is triggered

Deployment

NotificationServices

array

The list of notification services.

object

The notification service.

Channel

string

The notification channel:

  • Mail

  • Sms

  • DingRobot

  • Weixin

Valid values:

  • Mail :

    Email

  • Weixin :

    WebHook

  • Sms :

    SMS

  • DingRobot :

    DingTalk bot

Mail

Extension

string

The extension information in JSON format, such as {"atAll":"true"} to specify whether to @all members.

{"atAll":"true"}

Receiver

string

When Channel is set to DingRobot or Weixin, you must specify a WebhookUrl as the receiver.

https://dingtalk

ApprovalNodes

array

The list of approval nodes.

object

The 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 node approver:

  • DataWorksProjectRole: Workspace role

  • DataWorksProjectMember: Workspace member

  • TableAdministrator: Table owner

  • TableOrProjectAdministrator: Table owner 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.

When AccountType is set to different types, this field has different semantics:

  • DataWorksProjectMember: Specifies the UserId of a workspace member.

  • DataWorksProjectRole: Specifies the code of a workspace role.

  • MaxComputeRole: Specifies the MaxCompute role.

  • TenantRole: Specifies the code of a tenant role.

  • AliyunRamUser: Specifies the RAM userId.

string

The approver.

role_project_admin

ExtensionProperties

string

The extension description of the approval node.

none

Examples

Success response

JSON format

{
  "RequestId": "0bc5df3a17****903790e8e8a",
  "ProcessInstance": {
    "Id": "332066440109224007",
    "Title": "MaxCompute table permission request",
    "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": "John",
        "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": "John"
          }
        ]
      }
    ],
    "ApprovalProcessDefinition": {
      "Id": "323861511451222099",
      "Name": "SYSTEM_GENERATE_DEFAULT",
      "Description": "Process definition 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.