Basic Error Handling in OIC | Oracle Integration Cloud
This post featured in June 2020 Edition of Oracle PaaS Partner Community Newsletter
– Advertisement –
Use Case :
- First we will develop the Integration which will be capable to handle two mathematical operation – Addition and Multiplication as define in above Use Case.
- Then we will Add Error Handler in the Integration.
- Test the Integration.
![]() |
| SoapUI Tool-5.5.0 Image |
Sample Error Notification Email which we will receive if any Fault occur in the Integration :
– Advertisement –
Select REST Trigger connection.
Step 3 :
Enter some meaningful name and click Next
- Enter the below details and click Next –
- Download below schema and upload the same as Request Payload Format and then click Next
– Advertisement –
- Download below schema and upload the same as Response Payload Format and then click Next
- Click Done.
– Advertisement –
- Enter meaningful name and click Create
- Click on ‘+’ sign to add variable.
- Click on edit option (pencil icon) to add addition expression.
- Drag and drop the variable and create expression as shown in below image. [see below image for your reference]
- Put both the variables inside INTEGER Function and then click Validate & Close.
- Click Validate and close.
– Advertisement –
- Now declare one Variable in this assign activity :
- After assigning value to variable, click Validate and Close it.
– Advertisement –
Step 6:
Add For Each action and configure the below details and click Create:
*Current Element Name : Enter any meaningful name. The current element can be used for activities within the For Each scope.
Step 7: Add Scope within For Each and give some meaningful name and click Create.
– Advertisement –
Now add one Assign activity within the scope in which we will configure mathematical
expression to perform multiplication of multiple sets of numbers.
- Enter meaningful name and click Create.
- Select the variable name ‘vTotalMultiplicationValue’ which we have declare before For Each action.
- Click Edit option ( pencil icon )
- Build the Mathematical expression ( ex : Total=Total+ Number_1*Number_2 ) and putt all the three variables in Integer function as shown in below image. This expression will help to multiply all the sets of input numbers and then add them together to give final Output. After creating the expression click Validate & Click Close.
- Click Validate and close.
– Advertisement –
Step 9:
Now at last map the output of addition and total multiplication value. Open the mapper.
- Map the $vAddition variable to output variable, TotalAddition
- Then Assign Integer function (because output variable TotalAddition datatype is Integer) as shown in below image.
- Similarly map the $vTotalMultiplication to TotalMultiplication element and then assign Integer Function.
- Click Validate and Close the mapper.
– Advertisement –
- Drag and drop any one element and click Save and Close.
#ScopeFaultHandler :
Step 1:
Click on Fault Handler, available in Scope and then click Default Handler
- Default Fault Handler flow window will open. Here we will configure email notification to send Scope Error Detail .
– Advertisement –
Step 2: Add Notification
Enter meaningful name and click Create.
Step 3 : Configure the Notification payload with below details :
*From : Enter the sender email details.
*To : Enter the receiver email address.
*Subject : Write ‘Scope Error Notification’ or you can give any meaningful subject
*Body : Download the below HTML code and paste the same
Download HTML Code.
- Click on + icon and add parameter ‘ InterfaceName ‘ and then click Edit to assign value
– Advertisement –
- similarly add parameter “Error Message” and then click Edit to assign Parameter Value
- Drag & drop reason element from fault object and then click validate and Close
- Last but not the least declare the third parameter “MessageFlowId” and drag and drop the FlowID function. Click validate & close.
Notification window configuration completed. Click Validate & Close it.
#GlobalFaultHandler :
Step 1 :Click on Global Fault
– Advertisement –
Step 2 :Global Fault window will get open. search for Notification and add it.
Give some meaningful name and click create.
Step 3:
Configure the notification payload similarly like scope Notification Payload which we configured above. (Step 3 Of #ScopeFaultHandler)
– Advertisement –
once configuration completed, click Validate and Close.
Click Save and Close. Integration development completed and is ready to Test. Access the NEXT ARTICLE to TEST the Integration.
.
You may also like
14 comments
Leave a Reply Cancel reply
Archives
- November 2024
- October 2024
- May 2024
- June 2023
- December 2022
- October 2022
- September 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- August 2021
- July 2021
- May 2021
- March 2021
- January 2021
- November 2020
- October 2020
- September 2020
- May 2020
- March 2020
- February 2020
- January 2020
- December 2019
- August 2019
- July 2019
- June 2019
- May 2019
- March 2019
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||

























































Good One!
Thanks π
Hi Kabir,
Your blog is very nice for OIC stuff. I have multiple DB invokations in integration flow. how can I handle the DB related exception example, when DB went down. Thanks.
it can be handled in Scope Error Handler specifically for DB Adapter Invocation. Based on the Error message you can have a condition check for DB Down Error and then you can handled it as per your requirement.
got it. thanks Kabir.
Hello Habir,
I've Multible Integration and all of them without scope how can I hanle this case without recreate the integrations again?
Thanks
you can add scope anytime in the integration and then you can drag and drop MOST of the integration components (adapter,mapper) inside the scope.
I have a similar for each loop and iterating over a collection of records and invoking the rest api for each record. However i want to proceed with the the next iteration if we face an error, log the error we faced and proceed with the next set of records
Inside Scope define the code to log the error, so whenever error comes it will move inside scope and log the error and the proceed with next iteration.
If you still have problem to understand, Sumit you can contact me at 'thekabiryadav@outlook.com'
Yes, the logical thing was to create some activity (log or do something ) in the Manage Scope, and TEST, the whole idea suggested in the Post. But lazy me without being trying posted the query, I should have at least tried couple of times first and I apologize for that.
It worked like a charm. Thank you so much for your detailed and very informative post and your quick response.
Cheers!!
Welcome Sumit π
hello, in my integration I command multiple transactions, what I want is that when it finds an error, the same integration does not stop and continues with its flow
Regards
please read the blog properly, you will get the answer of your query….
Dear Kabir , If there is an error occurred in transaction and to retry the transaction Automatically not Manually.How can we achieve it is there any Retry action there .Please help me with your Inputs.