Perform Task Action
Retrieve Task Action
To determine the list of actions applicable for the task:
- Perform a GET operation on the BPM
tasksresource by following the relevant canonical link.For more information, see
Retrieve a Taskin the REST API for Common Features in Oracle Applications Cloud guide. - Inspect the attributes under
actionListand note the relevantactionId.
Example URL
The following is the format of the resource URL.
GET
/bpm/api/4.0/tasks/215362Example Response
The following is an example of the response body in JSON format.
{
...
"actionList": [
{
"actionId": "DELEGATE",
"actionType": "System",
"title": "DELEGATE",
"length": 0
},
{
"actionId": "SUSPEND",
"actionType": "System",
"title": "SUSPEND",
"length": 0
},
{
"actionId": "ESCALATE",
"actionType": "System",
"title": "ESCALATE",
"length": 0
},
{
"actionId": "REASSIGN",
"actionType": "System",
"title": "REASSIGN",
"length": 0
},
{
"actionId": "APPROVE",
"actionType": "Custom",
"title": "Approve",
"length": 0
},
{
"actionId": "REJECT",
"actionType": "Custom",
"title": "Reject",
"length": 0
}
...
]
...
}
Perform Task Action
To execute the task action:
- Perform a PUT operation on the task by
providing the identifier for the task action in the payload.
For more information, see
Perform action on a taskin the REST API for Common Features in Oracle Applications Cloud guide. - Verify the response to ensure task completion.
Example URL
The following is the format of the resource URL.
PUT
/bpm/api/4.0/tasks/215362Example Request
The following is an example of the request body in JSON format.
{
"action": {
"id": "APPROVE"
}
}
Example Response
The following is an example of the response body in JSON format.
{
...
"outcome": "APPROVE",
"titlePrefix": "Completed",
"actionList": [
{
"actionId": "VIEW_SUB_TASKS",
"actionType": "System",
"title": "VIEW_SUB_TASKS",
"length": 0
},
{
"actionId": "VIEW_PROCESS_HISTORY",
"actionType": "System",
"title": "VIEW_PROCESS_HISTORY",
"length": 0
},
{
"actionId": "VIEW_TASK",
"actionType": "System",
"title": "VIEW_TASK",
"length": 0
},
{
"actionId": "VIEW_TASK_HISTORY",
"actionType": "System",
"title": "VIEW_TASK_HISTORY",
"length": 0
}
]
...
}