GetProcessInstance
Retrieves details for a specified approval process instance, including its approval nodes and task list.
Operation description
Request description
By providing the approval process instance ID, you can query all related information about the instance, such as the approval process definition, approval nodes in the current state, and details of approval tasks on each node. This API operation is primarily used to monitor and manage the status of approval processes.
Before you begin
Before calling this API operation, you must activate DataWorks and have the permissions to view the target approval ticket. If the approval ticket involves a workspace, make sure that the calling account has been added to the corresponding workspace.
You can obtain the ProcessInstanceId required for this API operation from the following sources:
After submitting a resource permission application, you can obtain the approval process instance ID from
Data[]in the response of ApplyResourceAccessPermission.When querying existing approval tickets, you can use ListMyApplications, ListMyRelatedApprovals, or ListPendingApprovals and extract
Data.Data[].ProcessInstanceIdfrom the list items. When querying the list, you must pass inDefSchemaandResourceType.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetProcessInstance |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProcessInstanceId |
string |
Yes |
The process instance ID. |
332066440109224007 |
Response elements
|
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 ID of the process instance. |
332066440109224007 |
| Title |
string |
The name of the process instance. |
MaxCompute table access request |
| Status |
string |
The status of the process instance. Valid values:
Valid values:
|
completed |
| Applicator |
string |
The user ID of the applicant. |
1107558004253538 |
| ApplicatorName |
string |
The Alibaba Cloud account name of the applicant. |
test_account |
| StartTime |
any |
The time when the application was initiated. |
2026-05-25 10:20:18 CST |
| Reason |
string |
The reason for the request. |
Business need |
| 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:
Valid values:
|
Aborted |
| ApprovalComment |
string |
The approval comment. |
Approved |
| Assignee |
string |
The user ID of the actual approver. |
207947399706614297 |
| AssigneeName |
string |
The name of the actual approver. |
Li Si |
| ApprovalDecision |
string |
The approval decision. Valid values:
Valid values:
|
Deny |
| CreateTime |
integer |
The time when the task was created. The value is a 13-digit number, such as |
1715587200000 |
| CompleteTime |
integer |
The time when the task was completed. The value is a 13-digit number, such as |
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:
Valid values:
|
DataWorksProjectRole |
| Assignees |
array |
The specified approvers. The contents of this parameter depend on the
|
|
|
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. |
Li Si |
| ApprovalProcessDefinition |
object |
The approval policy applied to this process instance. |
|
| Id |
string |
The approval policy ID. |
323861511451222099 |
| Name |
string |
The approval policy name. |
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 |
| SubType |
string |
The subtype of the approval policy. Valid values:
|
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:
Valid values:
|
odpsProject |
| Expression |
string |
The conditional expression for the policy to take effect, such as |
((#odpsProject=='PX_BEIJING_TEST')) |
| Scope |
string |
The rule scope. Valid values:
Valid values:
|
Deployment |
| NotificationServices |
array<object> |
The notification services. |
|
|
object |
A notification service. |
||
| Channel |
string |
The notification channel. Valid values:
Valid values:
|
|
| Extension |
string |
Additional information in JSON format. For example, |
{"atAll":"true"} |
| Receiver |
string |
If |
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 |
| Assignees |
array |
The specified approvers. The contents of this parameter depend on the
|
|
|
string |
An approver. |
role_project_admin |
|
| ExtensionProperties |
string |
The extended description of the approval node. |
none |
Examples
Success response
JSON format
{
"RequestId": "0bc5df3a17****903790e8e8a",
"ProcessInstance": {
"Id": "332066440109224007",
"Title": "MaxCompute table permission application",
"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": "Li Si",
"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": "Li Si"
}
]
}
],
"ApprovalProcessDefinition": {
"Id": "323861511451222099",
"Name": "SYSTEM_GENERATE_DEFAULT",
"Description": "Approval policy 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.