Introduction:

This blog has the SOAP Webservice details that can be used to update the inactive manager assignments in Oracle Cloud application.

Cause of the issue:

Business wants to fix the Oracle Standard bug – when a manager assignment gets an update then respective employees manager assignment gets inactive.

How do we solve:

 Oracle provides a REST API webservice which can be used to update Inactive manager assignment. REST API responds with process status and error details in case of failure. Below is the sample payload used.

Steps

GET Employee’s Current Manager Details Using REST API:

END Point URL : https://oraclecloud.com:443/hcmRestApi/resources/11.13.18.05/workers?q=PersonNumber={{P_EMPLOYEE_NUMBER}}&expand=workRelationships.assignments.managers

Method: GET

Post-Response Script:

var jsonResponse = pm.response.json();

pm.collectionVariables.set(“href”,jsonResponse.items[0].workRelationships[0].assignments[0].managers[0].links[0].href)

pm.collectionVariables.set(“PersonNumber”,jsonResponse.items[0].PersonNumber)

pm.collectionVariables.set(“ManagerAssignmentNumber”,jsonResponse.items[0].workRelationships[0].assignments[0].managers[0].ManagerAssignmentNumber)

pm.collectionVariables.set(“ActionCode”,jsonResponse.items[0].workRelationships[0].assignments[0].managers[0].ActionCode)

 

console.log(“href:”,pm.collectionVariables.get(“href”));

console.log(“PersonNumber:”,pm.collectionVariables.get(“PersonNumber”));

console.log(“ManagerAssignmentNumber:”,pm.collectionVariables.get(“ManagerAssignmentNumber”));

console.log(“ActionCode:”,pm.collectionVariables.get(“ActionCode”));

Update Employee’s Manager Assignment Details Using REST API from flat file using Runner:

 END Point URL : {{href}}

Method: PATCH

Payload:

{

“ActionCode”: “{{ActionCode}}”,

“ManagerAssignmentNumber”: “{{P_SUP_ASSIGNMENT_NUMBER}}”

}

 Response:

The response will have the status code.

  • Success code – “200 OK”
  • Error code – anything other than 200 OK
Recent Posts

Start typing and press Enter to search