Wednesday, March 9, 2022

OIC ERP BI publisher call Retry logic Usecase 2

Use Case: 

We have OIC to ERP Bulk import Integration and once import gets completed, we are calling another sub-integration to get the callback from ERP. 

To get callback, we are calling BI publisher report in the subintegration and place the callback file in the SFTP directory. 

In production, we are observing 5 mins time limit exceeded error while invoking the client ERP BI service and integration gets failed and we are not receiving the Callback file. As a result, we need to manually generate the callback file from ERP for further processing.

What we do:

  • One - Retry the ERP callback call atleast 5 times before it finally gets failed.
  • Two - In every retry, we have to check if we receive the callback file in the SFTP server directory. That file also check loops five times.

Integration flow:

Steps in detail:

Step1: Take a assign and create a Variable ControlReportExists

p_controlReportExist : false

p_ExceptionCode: ""

p_ExceptionReason: ""

p_ExceptionDetails: ""

p_callBackCount: 0.0

Step2: Take a while and loop it for five times.

$p_controlReportExist: "false" and $p_callBackCount <=4.0

Step3: Take a scope and call the callback subintegration and assign the customized Exception code, reason and details.

Step4: Take a assign for initiate file check count

p_FileCheckCount =0

Step5: Take a while loop and loop it for 5 times to check the file exist in the SFTP directory.

$p_FileCheckCount <=4.0 and $p_controlReportExist="false"

Step6: Call FTP with list operation and required File pattern and direcrory details.

Step7: Take a switch and 

if ItemCount =0,


p_controlReportExist= "false"

p_FileCheckCount=$p_FileCheckCount + 1.0

Wait 59 sec


p_controlReportExist= "true"

Step8: take a assign and increase the callback counter by 1.

p_callbackCount =$p_callbackCount + 1.0


This retry logic will save manual work and tine and most cases(99%), it will work smoothly and gets the callback file.

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