Testing of Basic Error Handling in OIC
Prerequisite : SoapUI Tool
Lets see the testing steps in detail :
- Activate the Integration and open the URL which get generated after integration activation.
- Copy the Endpoint URL
– Advertisement –
- Open SoapUI Tool and create a REST Project. Paste the copied Endpoint URL.
- Select Method = Post and Media Type =application/xml and then click 🔓 Auth to add basic Authorization
- Select Add New Authorization and select Type = Basic and then click Ok.
- Enter your OIC Instance User Id and Password in Username and Password box respectively.
– Advertisement –
- Now Download the Request Payload from below link and paste the same in SoapUI Request Box
- Hit the Run button and you will see the respective Output in right side response window.
[ See the below testing window for your reference ]
We have tested the Integration successfully. It is working as of our usecase.
Now lets check our Error Handling Scenario. We will intentionally made the Service to get Error Out by passing some random data as Input and then check whether the Error Handling is working properly or not .
Lets first check “Global Fault Handler” :
– Advertisement –
Now Hit the Run Button. The service will get error out because “XYZ” is a STRING not an INTEGER. So Addition operation got failed
i.e. XYZ + 5 = ERROR
- Now to check where the service exactly failed, Lets see its Flow Instance in OIC. Open the OIC Instance –> Go to Monitoring Window–> select Tracking and then open the failed Instance.
Once the Flow get opened you can see the service get failed at Addition
Operation Execution. This error get handled by “GLOBAL FAULT HANDLER”
because it is not inside any scope and the Flow execution will stop.
If you click on Global Fault, you can see its flow. It handled the error and
sent email notification.
Now check your email, You have got one Error Email Notification similar like
below
– Advertisement –
Now lets first check “Scope Fault Handler” :
- Change the Input XML Data of
Element i.e. in-place of “ 4 “ passXYZ (a string in-place of integer)
*Make sure you have removed XYZ and passing some Integer as input in element which we have configured above to test Global Fault Handler.
(check below image for you reference)
Hit the Run Button. This time you can see output in SoapUI response window because the error handled by Scope Fault Handler and execution of Flow continues without getting stopped.
Addition OutPut = 4+5 = 9
Multiplication Output :
- 1st Iteration : 41*25 = 1025
- 2nd Iteration : XYZ*90= ERROR Out — >handled by Scope Fault Handler — >Move for next Iteration )
- 3rd Iteration : 4*5= 20
Total Multiplication Value = 41*25+4*5 = 1045 (You can see the same value as multiplication output ,check below image)
- Lets see its Flow Instance in OIC. Open the OIC Instance –> Go to Monitoring Window–> select Tracking and then open the recent Instance.
Now check your email, You have got one Error Email Notification from Scope Fault Handler similar like below :
That’s it. I hope this blog helped you to understand basic Error Handling in OIC.
Thank You ! & Stay Happy 🙂
– Advertisement –
You may also like
8 comments
Leave a Reply to Anonymous 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 | |||


















Excellent.. Can you please let me know, how to process error records. I mean out of 100 records if 20 records got error out, then how to process these records
you can store that 20 records(ex-inside a database or FTP server) and later can reprocess these records invoking same integration. You can also edit the data(of these 20 records) once they get store in database or FTP
Disclaimer :Dear this is just a suggestion, you can use different approach also for reprocessing. Its totally depends on your requirement and resource availability 🙂
Excellent explanation.Very deatil with POC .Many Thanks
Thanks Uday 😊
Excellent post on Exception handling in OIC.
Thank You 🙂
bro after uploading my request payload, it is showing nothing in the output in the right side for me.Can u tell me what am i doing wrong
bro! share me the screenshot at "thekabiryadav@outlook.com"