Overview
An integration can fail for many reasons, and you often want to retry so the transactions can be successful. This blog reviews the the process of configuring the retries in the Oracle Integration.
In the event of a failure while invoking a target endpoint, Oracle Integration can invoke the target endpoint with a custom retry mechanism to ensure that the failures are retried a configured number of times. The retry logic is implemented using couple of integration patterns. This blog explains how to configure the retry patterns to retry the invocation of a target endpoint in the event of a failure.
An integration needs to be simulated by wrapping around a complex logic along with a scope, while loop and fault handler to achieve the Retry. On Retry, the invoke either succeeds or fails. If the invoke is successful, the execution continues with the next actions that are configured in the integration flow. If the invoke is a failure, the integration goes into the retry loop and performs the actions configured in the Scope Fault Handler. Inside the Scope Fault Handler, the integration increments the retry number and checks if the retry limit is reached. If the limit is not reached, the integration waits for the next retry and executes the scope again. If the limit is reached, the integration can have 2 scenarios:
- Scenario A: Continue the execution of subsequent actions
- Scenario B: Throw the fault to global fault handler
Scenario A: Continue the execution of subsequent actions
Design Diagram

Execution Steps
Scope the business logic, with a while loop around, where you want to perform the retry logic. You can refer the same configuration in this recipe.

Initialize the Integration property retryLimit = n. This integration property specifies the number of possible retries if any invoke fails at runtime.

Initialize Retry Variables retryNo=0 & retryStatus=” ”. This step initializes the variables before proceeding with the Target Endpoint Scope, as mentioned in the above design.

While retryNo <= 0 and retryStatus /= Success, the execution proceeds to Target Endpoint Scope, which comprises Invoke Target endpoint and Update retry Variables process.

After the Target Endpoint scope succeeds, the values for retry variables need to be updated as follows, and the Target Endpoint Scope process is termed as Complete.
- retryNo = retryNo + 1
- retryStatus = Success

If the Target Endpoint Scope is not successful, the execution proceeds to the Scope Fault Handler.

The integration updates the following retry variables on failure.
- retryNo = retryNo + 1
- retryStatus = Failure

If (retryNo = retryLimit + 1) is a failure, the integration waits for the next retry and continues to the while loop condition evaluation.
Note: This process can be repeated until the declared retryLimit exhausts or the invoke succeeds.

If (retryNo = retryLimit + 1) is a success; that is, the retry limit has been exhausted, the integration continues executing the next actions.
Scenario B: Throw the Fault to Global Fault Handler
Design Diagram

Execution Steps
Note: All the steps remain same as Scenario A above except the retry limit exhaustion step.
If the process needs to stop, the integration throws the fault to Global Fault Handler and terminates.

In the global fault handler, the integration sends a Fault Notification to the support team DL configured and terminates as Errored.

Example Implementations
See the following recipes, in which we have implemented the above patterns
| Sl. No | Recipe | Fault handling Strategy |
|---|---|---|
| 1 | Import Segments from Oracle Unity to Salesforce Marketing Cloud | Scenario B |
| 2 | Sync Contracts between SAP Ariba and Oracle ERP Cloud | Scenario A |
| 3 | Import Employees from SAP SuccessFactors to Oracle E-Business Suite | Scenario A |
