Friday, February 18, 2022

OIC - Custom ERP import callback using BI report + FAH callback

Usecase: Here, we will see how to get custom fusion accounting hub callback from ERP.

Highlevel steps:

  • Main flow (where import and child process runs) call to callback integration
  • Archive the success file
  • Execute the execution accounting report based on child request id for support help.
  • Invoke BI report and get the callback
  • Log the callback in a location for validation.

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":""

}

Implementation steps:

  1. Take a Bodyscope and take a Switch block and check if importRequestStatus ="SUCCEEDED" 
    1. IF Yes, and again check childRequestStatus ="SUCCEEDED"
      1. IF Yes, 
        1. 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. Follow my below blog how to send or move files https://soalicious.blogspot.com/2023/12/oic-create-resuable-integration-to.html
        2. IF ExceptionCode or ExceptionReason or ExceptionDetails anyone is not empty, throw new fault that importsuccessArchiveFault
        3. If childRequestId !="" then call ERP cloud adapter to submit create accounting execution report.

          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

        4. Submit a ESS job to create BI bursting callback or control report. Operation: submitESSJobRequest service: ErpIntegrationService

          1. jobPackageName: "oracle/apps/ess/custom/delta" 
          2. jobDefinitionName: FIN_FAH_Control_Report_ESS
          3. ParameterList: importRequestId
        5. Create a custom report file name: like ReportFileName: concat("Oracle_Control_Report_FAH_",current-date(),hours-from-dateTime(current-dateTime()),".",minutes-from-dateTime(current-dateTime()),".",seconds-from-dateTime(current-dateTime()),".log")

        6. Call a subIntegration like moveCustomReport with below parameters: where we will check ess job completion staus and then download and move the report.https://soalicious.blogspot.com/2022/08/oic-to-erp-improved-custom-callback.html

          1. Request id : result of submit ess job request
          2. Directory adapter
          3. Sourcefilename
          4. Targetdirectory
      2. Otherwise,
    2. IF No, ???

screenshots:

for submitting create accounting execution report:








ERP BI SQL Query for custom import callback.

https://soalicious.blogspot.com/2022/04/erp-bi-sql-query-for-custom-import.html

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...