Tuesday, August 16, 2022

OIC to ERP : Improved Custom CallBack Part 2 | Eradicate Time Out issue

Custom callback design changed to overcome the BI report execution time out issue as below.

HighLevel steps:

  • Main flow (where import and child process runs) call to callback integration
  • Archive the success file
  • Execute the execition accounting report based on child request id for support help.
  • Call ESS job which internally calls the BI report to execute the SQL query to get the callback report
  • Call a Sub Integration like MoveCTRLReport and feed the ESS job process id
    • Here, check the ESS job status using getESSJobStatus(Interesting fact is that we are looping max 55 times to check if the ESS process completes )
    • If ESS process gets completed,
      • Download the control report using downloadESSJobExecutionDetails operation
      • Write the control report in stage
      • Unzip the report
      • Read the text report
      • Move the report to FTP location

Detailed Steps:

Step1: We have 2 integrations, 

  • Main Integration where it will import the file and complete the child process if any.
  • The main flow then call the custom callback integration with below request and response:

Request:

{

"base64FileReference" : "ref",

"sourceFileName": "name",

"archiveDirectory": "",

"importRequestId": "",

"importRequestStatus":"",

"childRequestId":"",

"childRequestStatus":"",

"logDirectory":"",

"logFileName":"",

"deleteBaseDirectory": "",

"directoryAdapter":""

}

Response:

{

"archiveComplete":"Y",

"logComplete": "Y",

"ExceptionCode":"",

"ExceptionReason":"",

"ExceptionDetails":""

}

Step2: Take a Bodyscope and take a Switch block and check if importRequestStatus ="SUCCEEDED" and again check childRequestStatus ="SUCCEEDED"

Step3: Move success file to archive folder invoking another sub integration which handles the file movement, move from source folder to archive folder and delete in the source folder.

Step4: If childRequestId !="" then call ERP cloud adapter

Service: ErpIntegrationService

Operation: submitESSjobRequest.

And map the all parameters to run the accounting execution report.

jobPakageName: "/oracle/apps/ess/financials/subledger/Accounting/shared"

jobDefinitionName: "XLAFSNAPRPTRPT"

paramList: childRequestID,D,N,N







Step5: call ESS job. The job calls the BI report which actually runs a SQL model to generate the callback control report.




The ESS job:


Step6: check if the ESS process completes and download the control report and move the report to FTP location

Call the downloadESSJobExecutionDetails 



Write the file to a stage directorya as opaque



Unzip the files


Read the callback report where filetype = text.





No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...