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:
- Create an app driven rest trigger integration with
- Input: ESSJOBRequestID as template param and queryCount as Query param.
- Output: returnStatus
- SetRequestVariables
- requestStatus = ""
- loopCounter = 0.0
- inProgress = "true"
- MaxLoopCount = $queryCount
- Take a while loop with condition $I_inProgress = "true"
- Configure ERP cloud adapter and call erpIntegrationService and operation: getESSJobStatus
- Update loop counter and status
- loopCounter = $loopCounter +1
- requestStatus = result
- inProgress = returnStatusV2(result)
- Take a switch
- If loopCounter = maxLoopCount then Exit loop with below updates
- inProgress = "false"
- requestStatus = "Error, exceeded max wait time."
- Update request status
Response rest json:
{
"returnStatus": "",
"exceptionCode":"",
"exceptionReason":"",
"exceptionDetails":""
}
Detailed steps with Screenshots:
No comments:
Post a Comment