GetProcessDefinition - GetProcessDefinition

更新时间:
复制 MD 格式

Retrieves the approval policy for a given process definition ID.

Operation description

Request

  • This API retrieves the details of a specific approval process definition using the Id parameter.

  • The Id parameter is required and must be a valid process definition ID.

  • The response includes the basic properties of the approval process definition, rule conditions, notification service configurations, and approval nodes.

  • A successful request returns the complete process definition object. A failed request returns an error code and message for troubleshooting.

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

Id

string

Yes

The process definition ID.

f0d6d578-a305-40ac-ba1e-0a09f64cbc69

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

0bc5df3a17***903790e8e8a

ProcessDefinition

object

The process definition.

Id

string

The process definition ID.

210001039767

Name

string

The name of the process definition.

MaxCompute table approval

Description

string

The description of the process definition.

Order business data approval process

Type

string

The type of the process definition. Valid values:

  • MaxCompute

  • DataService

  • Extension

  • Hologres

  • DlfV1 (custom creation not supported)

  • 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. Valid values:

  • Table

  • Column

  • Database

  • Schema

  • Default

Table

IsSystem

boolean

Indicates whether the policy is a system default policy.

false

Enabled

boolean

Indicates whether the policy is enabled.

true

RuleConditions

array

The list of rule conditions for the approval policy.

object

A rule condition for the approval policy.

Type

string

The condition type. Valid values:

  • odpsProject,

  • hologresInstanceId

  • sensibleLevel,

  • tableGuid,

  • projectId

odpsProject

Expression

string

The condition expression in the format ((#type=='typeValue')). Example: ((#odpsProject=='PX_BEIJING_TEST')).

((#odpsProject=='PX_BEIJING_TEST'))

Scope

string

The stage at which the rule takes effect. Valid values:

  • Deployment: determines whether the approval policy matches when a request is submitted.

  • Running: determines whether approval is exempted during the approval process execution. This value is supported only for the MaxCompute type.

Deployment

NotificationServices

array

The notification service declarations.

object

A notification service.

Channel

string

The notification channel. Valid values:

  • Mail

  • Sms

  • DingRobot

  • Weixin

DingRobot

Extension

string

The extension information in JSON format. Example: {"atAll":"true"}, which specifies whether to mention all members.

{"atAll":"true"}

Receiver

string

The webhook URL. This parameter is required when Channel is set to DingRobot or Weixin.

https://dingtalk.com

ApprovalNodes

array

The list of approval nodes.

array

An approval node.

Id

string

The node ID.

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

Name

string

The node name.

default-name

AccountType

string

The approver account type. Valid values:

  • DataWorksProjectRole: workspace role

  • DataWorksProjectMember: workspace member

  • TableAdministrator: table owner

  • TableOrProjectAdministrator: table owner or workspace administrator

  • AliyunResourceOwner: Alibaba Cloud account

  • MaxComputeRole: MaxCompute administrator

  • DLFAdmin: DlfLegacy administrator

  • DLFNextAdmin: DLFNext administrator

  • TenantRole: tenant role

  • EmrAdministrator: EMR administrator

  • LindormAdministrator: Lindorm administrator

  • AliyunRamUser: RAM user

TableOrProjectAdministrator

Assignees

array

The semantics of this parameter varies based on the AccountType value:

  • DataWorksProjectMember: specifies the UserId of the workspace member.

  • DataWorksProjectRole: specifies the code of the workspace role.

  • MaxComputeRole: specifies the MaxCompute role.

  • TenantRole: specifies the code of the tenant role.

  • AliyunRamUser: specifies the RAM user ID.

string

The approver.

213463068144525171

ExtensionProperties

object

The additional declarations vary based on the AccountType value:

  • DataWorksProjectMember: the key is projectId and the value is the UserId of the workspace member. Separate multiple values with commas (,).

  • MaxComputeRole: the key is the MaxCompute project and the value is the role name in MaxCompute. Separate multiple values with commas (,).

any

The extension description.

{ "449656": "role_project_admin,role_project_pe" }

Examples

Success response

JSON format

{
  "RequestId": "0bc5df3a17***903790e8e8a",
  "ProcessDefinition": {
    "Id": "210001039767",
    "Name": "MaxCompute Table Approval",
    "Description": "Order business data approval process",
    "Type": "MaxCompute",
    "SubType": "Table",
    "IsSystem": false,
    "Enabled": true,
    "RuleConditions": [
      {
        "Type": "odpsProject",
        "Expression": "((#odpsProject=='PX_BEIJING_TEST'))",
        "Scope": "Deployment"
      }
    ],
    "NotificationServices": [
      {
        "Channel": "DingRobot",
        "Extension": "{\"atAll\":\"true\"}",
        "Receiver": "https://dingtalk.com"
      }
    ],
    "ApprovalNodes": [
      {
        "Id": "7a809b6a-2a62-4c6c-9c23-c2a145e3877d",
        "Name": "default-name",
        "AccountType": "TableOrProjectAdministrator",
        "Assignees": [
          "213463068144525171"
        ],
        "ExtensionProperties": {
          "key": "{\n        \"449656\": \"role_project_admin,role_project_pe\"\n      }"
        }
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.