Tuesday, January 16, 2024

OIC - ERP - Monitor Progress of ESS job and return status | Reusable component to monitor the ESS job run status

Usecase: we will create reusable integration which will take the ESS job run request id as input and monitor the ESS job status and return back the status as response to the caller integration.

Detailed logic steps:

  1. Create an app driven rest trigger integration with
    1. Input: ESSJOBRequestID as template param and queryCount as Query param.
    2. Output: returnStatus
  2. SetRequestVariables
    1. requestStatus = ""
    2. loopCounter = 0.0
    3. inProgress = "true"
    4. MaxLoopCount = $queryCount
  3. Take a while loop with condition $I_inProgress = "true"
    1. Configure ERP cloud adapter and call erpIntegrationService and operation: getESSJobStatus
    2. Update loop counter and status
      1. loopCounter = $loopCounter +1
      2. requestStatus = result
      3. inProgress = returnStatusV2(result)
    3. Take a switch
      1. If loopCounter = maxLoopCount then Exit loop with below updates
        1. inProgress = "false"
        2. requestStatus = "Error, exceeded max wait time."
  4. Update request status

Response rest json:

{

"returnStatus": "",

"exceptionCode":"",

"exceptionReason":"",

"exceptionDetails":""

}

Detailed steps with Screenshots:




















No comments:

Post a Comment

Featured Post

OIC - Oracle Integration Cloud (OIC) – Upload File to UCM, Submit ESS Job, and Monitor Job Status

A common Oracle ERP Cloud integration pattern is to upload a file to UCM, submit an ESS job, and then poll the ESS job status until it compl...