GetProcessDefinition

Updated at:

Retrieves the details of an approval policy based on the specified process definition ID.

Operation description

Request description

  • This operation queries all information about a specific approval process definition by using the specified Id parameter.

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

  • The returned information includes but is not limited to the basic attributes, rule conditions, notification service configurations, and approval nodes of the process definition.

  • If the request is successful, the data containing the complete process definition object is returned. If the request fails, the corresponding error code and message are provided to help troubleshoot the issue.

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:GetProcessDefinition

get

*All Resource

*

None None

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 API 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 business process.

Order business data approval process

Type

string

The process definition type. Valid values:

  • MaxCompute

  • DataService

  • Extension

  • Hologres

  • DlfV1: Custom creation is not supported.

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

  • Table

  • Column

  • Database

  • Schema

  • Default

Table

IsSystem

boolean

Indicates whether the policy is the default system policy.

false

Enabled

boolean

Indicates whether the policy is enabled.

true

RuleConditions

array<object>

The list of effective rules for the approval policy.

object

The effective rule for the approval policy.

Type

string

The condition type. Valid values:

  • odpsProject

  • hologresInstanceId

  • sensibleLevel

  • tableGuid

  • projectId

odpsProject

Expression

string

The conditional expression in the ((#type=='typeValue')) format, such as ((#odpsProject=='PX_BEIJING_TEST')).

((#odpsProject=='PX_BEIJING_TEST'))

Scope

string

The effective stage of the rule. Valid values:

  • Deployment: Used to determine whether the approval policy is matched when an application is submitted.

  • Running: Used to determine whether to skip approval while the approval process runs. This value is supported only for the MaxCompute type.

Deployment

NotificationServices

array<object>

The notification service configurations.

object

The notification service.

Channel

string

The notification channel. Valid values:

  • Mail

  • Sms

  • DingRobot

  • Weixin

DingRobot

Extension

string

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

{"atAll":"true"}

Receiver

string

The receiver. If Channel is set to DingRobot or Weixin, you must specify WebhookUrl.

https://dingtalk.com

ApprovalNodes

array<object>

The list of approval nodes.

array<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 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 administrator.

  • DLFAdmin: DLF legacy administrator.

  • DLFNextAdmin: DLFNext administrator.

  • TenantRole: Tenant role.

  • EmrAdministrator: EMR administrator.

  • LindormAdministrator: Lindorm administrator.

  • AliyunRamUser: RAM user.

TableOrProjectAdministrator

Assignees

array

The semantics vary based on the AccountType value:

  • DataWorksProjectMember: Specifies the user ID 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 required for different AccountType values:

  • DataWorksProjectMember: The key is projectId, and the value is the user ID 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.

{"449656": "role_project_admin,role_project_pe"}

any

The extended 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.