One of the most common requirements of enterprise integration is error management. It is critical for customers to manage recoverable errors in a seamless and automated fashion.
All faulted instances in asynchronous flows in Oracle Integration Cloud Service are recoverable and can be resubmitted. Synchronous flows cannot be resubmitted. You can resubmit errors in the following ways:
Today operator can manually resubmit failed messages individually from the integration console monitor dashboard.
In this blog we are going to focus on how to create an integration flow that can be used to auto resubmit faulted instances in bulk.
Here are the High Level Steps
Here are the steps to create an integration flow to implement the automated bulk recovery of errors.
Note we also provide a sample that is available for download.
It is always a good practice to parametrize the variable so you can configure the flow based on business need by overriding them, here are the schedule parameters configured in this bulk resubmit fault instances integration sample.
STEP 4a: if Total Recovery Error Instances Found is more than Max Threshold (totalResults > strMaxThershold) then Send a Notification. In this case there may be too many errors, indicating a more serious problem, it is best practice to review manually and once the issue is fixed to temporarily override the strMaxThershold value to allow recovery of failed instances.
STEP 4b: else if No Recovery Error Instances Found (totalResults <= 0) then End Flow.
STEP 4c: else Continue to resubmit strMaxBatchSize Found Errors in a single batch.
NOTE: We limit the number of errors re-submitted in a single batch to avoid overloading the system, we suggest a limit of 50 instances.
STEP 5: Query Recovery Errors (limit to Batch Size)
STEP 6a: if totalResults found < strMinBatchSize , then skip the batch re-submit and stop the flow
STEP 6b: else if totalResults > strMinBatchSize, then Invoke REST API to submit fault errors IDs Bulk Re-submit Error API.
Here we can filter out the Fault Instance that are already retry but did fail again, as shown below
- Drag and Drop For each items
- Add if function from Mapper on top of items
- Add <= condition element
- Add Left Operator = retryCount from source
- Add Right Operator = strMaxRetryAttempt from variable
retryCount < = $strMaxRetryAttempt
(Optional): User can model the integration to invoke a process (using OIC process capability for human interaction and long running tasks) or take any action based on re-submit response via a child flow, or other 3rd party Integration. This may be to post the re-submit information to some system for future analysis/ review. One can utilize the local invoke feature to model the parent to child flow hand off.
One can also run OnDemand with the option of SubmitNow
Here is the Email Notification one would receive
Case1: When Bulk Resubmit success email is sent as below (Sample).
Case2: When Too Many Fault Instance and Alert Email Sent as below (Sample).
Ok, by now you have completed Development of Integration and schedule to run on your Integration Cloud Instances.
Because different integration or error types may have different recovery requirements you may want to have different query parameters and/or scheduled intervals.
For this you need to clone the above Integration and override schedule parameter to query only specific fault Instance for a given Integration or Connection Type based on query filter. so you can keep separate instance running for a specific business use case.
Here is how you do it:
timewindow : '3d', code : 'SC2RNSYNC', version : '01.00.0000'
code : 'SC2RNSYNC', version : '01.00.0000', connection :'EH_RN'
timewindow : '3d', primaryValue : 'TestValue'
You may also want to modify other parameters or even to modify the integration to take alternative actions.
This will give you ability to config the bulk re-submit for given set of integration level or connection level.
This blog explained how to automatically resubmit errored instances, allowing control of rate of recovery, type of errors to recover and showed how to customize the recovery integration through cloning and modifying parameters.
We hope that you find this a useful pattern for your integrations.