All Products
Search
Document Center

DataWorks:GetProcessInstance

Last Updated:Jun 11, 2026

Mengambil detail instans proses persetujuan tertentu, termasuk node persetujuan dan daftar tugasnya.

Deskripsi operasi

Request

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

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

ProcessInstanceId

string

Yes

ID instans proses.

332066440109224007

Elemen respons

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 process instance ID.

332066440109224007

Title

string

The name of the process instance.

MaxCompute表权限申请

Status

string

The status of the process instance. Valid values:

  • Completed: The request is approved.

  • Running: The request is in the approval process.

  • Aborted: The request is withdrawn.

Valid values:

  • running :

    running

  • aborted :

    aborted

  • completed :

    completed

completed

Applicator

string

The user ID of the applicant.

1107558004253538

ApplicatorName

string

The username of the applicant's Alibaba Cloud account.

test_account

StartTime

any

The time when the approval process started.

2026-05-25 10:20:18 CST

Reason

string

The reason for the request.

业务需要

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

  • Pending :

    Pending

  • Aborted :

    Aborted

Aborted

ApprovalComment

string

The approval comment.

同意

Assignee

string

The user ID of the actual approver.

207947399706614297

AssigneeName

string

The name of the actual approver.

李四

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.

1715587200000

CompleteTime

integer

The time when the task was completed.

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: A workspace role

  • DataWorksProjectMember: A workspace member

  • TableAdministrator: A table administrator

  • TableOrProjectAdministrator: A table or workspace administrator

  • AliyunResourceOwner: An Alibaba Cloud account

  • MaxComputeRole: A MaxCompute role

  • DLFAdmin: A DlfLegacy administrator

  • DLFNextAdmin: A DLFNext administrator

  • TenantRole: A tenant role

  • EmrAdministrator: An Emr administrator

  • LindormAdministrator: A Lindorm administrator

  • AliyunRamUser: A 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 or workspace administrator

  • EmrAdministrator :

    Emr administrator

  • TableAdministrator :

    Table administrator

  • 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.

李四

ApprovalProcessDefinition

object

The approval policy applied to this 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.

流程定义描述

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 expression of the rule condition. Format: ((#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: A workspace role

  • DataWorksProjectMember: A workspace member

  • TableAdministrator: A table administrator

  • TableOrProjectAdministrator: A table or workspace administrator

  • AliyunResourceOwner: An Alibaba Cloud account

  • MaxComputeRole: A MaxCompute role

  • DLFAdmin: A DlfLegacy administrator

  • DLFNextAdmin: A DLFNext administrator

  • TenantRole: A tenant role

  • EmrAdministrator: An Emr administrator

  • LindormAdministrator: A Lindorm administrator

  • AliyunRamUser: A 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

Contoh

Respons sukses

JSONformat

{
  "RequestId": "0bc5df3a17****903790e8e8a",
  "ProcessInstance": {
    "Id": "332066440109224007",
    "Title": "MaxCompute表权限申请",
    "Status": "completed",
    "Applicator": "1107558004253538",
    "ApplicatorName": "test_account",
    "StartTime": "2026-05-25 10:20:18 CST",
    "Reason": "业务需要",
    "AuthErrorMessage": "S-400007:ODPS acl auth failed. odps table acl auth failed",
    "ApprovalTasks": [
      {
        "Id": "task_001",
        "Status": "Aborted",
        "ApprovalComment": "同意",
        "Assignee": "207947399706614297",
        "AssigneeName": "李四",
        "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": "李四"
          }
        ]
      }
    ],
    "ApprovalProcessDefinition": {
      "Id": "323861511451222099",
      "Name": "SYSTEM_GENERATE_DEFAULT",
      "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"
        }
      ]
    }
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.