Todos os produtos
Search
Central de documentação

DataWorks:GetProcessInstance

Última atualização: Sep 03, 2026

Obtém os detalhes de uma instância de processo de aprovação especificada, incluindo seus nós de aprovação e lista de tarefas.

Descrição da operação

Solicitação

Esta API é usada para monitorar e gerenciar o status de um processo de aprovação. Ao fornecer o ID da instância do processo de aprovação, você pode consultar informações relacionadas, como a definição do processo de aprovação, os nós de aprovação atuais e as tarefas em cada nó.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

Nenhuma autorização necessária para esta operação. Se você encontrar problemas com esta operação, entre em contato com o suporte técnico.

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

ProcessInstanceId

string

Sim

O ID da instância do processo.

332066440109224007

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

Os dados retornados.

RequestId

string

O ID da solicitação. Use este ID para localizar logs e solucionar problemas.

0bc5df3a17****903790e8e8a

ProcessInstance

object

Os detalhes da instância do processo de aprovação.

Id

string

O ID da instância do processo.

332066440109224007

Title

string

O nome da instância do processo.

MaxCompute表权限申请

Status

string

O status da instância do processo. Valores válidos:

  • Completed: A solicitação foi aprovada.

  • Running: A solicitação está em processo de aprovação.

  • Aborted: A solicitação foi retirada.

Valores válidos:

  • running :

    running.

  • aborted :

    aborted.

  • completed :

    completed.

completed

Applicator

string

O ID de usuário do solicitante.

1107558004253538

ApplicatorName

string

O nome de usuário da conta Alibaba Cloud do solicitante.

test_account

StartTime

any

A hora em que o processo de aprovação começou.

2026-05-25 10:20:18 CST

Reason

string

O motivo da solicitação.

业务需要

AuthErrorMessage

string

A mensagem de falha de autorização.

Nota: Este parâmetro é retornado apenas se a autorização falhar.

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

ApprovalTasks

array<object>

As tarefas de aprovação.

array<object>

Uma tarefa de aprovação.

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.

Valores válidos:

  • 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

Valores válidos:

  • 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

Valores válidos:

  • 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

A política de aprovação aplicada a esta instância de processo.

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.

Valores válidos:

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

Valores válidos:

  • 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

Valores válidos:

  • 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

Exemplos

Resposta de sucesso

JSON formato

{
  "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"
        }
      ]
    }
  }
}

Códigos de erro

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.