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:
- Take a Bodyscope and take a Switch block and check if importRequestStatus ="SUCCEEDED"
- IF Yes, and again check childRequestStatus ="SUCCEEDED"
- IF Yes,
- 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
- IF ExceptionCode or ExceptionReason or ExceptionDetails anyone is not empty, throw new fault that importsuccessArchiveFault
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
Submit a ESS job to create BI bursting callback or control report. Operation: submitESSJobRequest service: ErpIntegrationService
- jobPackageName: "oracle/apps/ess/custom/delta"
- jobDefinitionName: FIN_FAH_Control_Report_ESS
- ParameterList: importRequestId
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")
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
- Request id : result of submit ess job request
- Directory adapter
- Sourcefilename
- Targetdirectory
- Otherwise,
- IF importRequest Status not succceeded then
- Archive the file.
- Download ess job execution details using erpIntegraTionService and feed input as import request id and filetype= log
- Write zip file uaing stage (content to xsd opaque element)
- Unzip file.
- For each unzip file, if filetype =log then
- move log file to ftp or desired place.OIC_FILE_HANDLER
- Create inc and create log using child integration OIC_Notifocation
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