Академический Документы
Профессиональный Документы
Культура Документы
Community
Sujit Hemachandran
January 12, 2015 2 minute read
Hello Integrators!
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 1/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
On a technical de nition, exception handling is the process of responding to the occurrence, during message processing, of exceptions. There exists scenarios
where you want to control the exception process. For example, during a message processing you want to log all the exceptions in a speci c location or server; or
you want to modify the exception message sent back to the receiver; and so on.
An exception is handled by saving the current state of execution in a prede ned place and switching the execution to a speci c subroutine known as an
exception sub-process. Exceptions can occur during any of the message processing step – Mapping execution error, Content Routing error, and so on.
You model exceptions as a sub-process in the integration ows. To add an exception sub-process to the integration ow, choose Exception Subprocess from the
palette. And drop the sub-process into the integration process. Note: The sub-process should not be connected to any of the elements of the integration ow.
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 2/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
In the Integration ow above, when any exception occurs in the message processing – the sub-process is executed.
Consider the integration ow that we just saw: A SOAP sender sends messages to the integration ow (It is designed to fail at the mapping!) . When an
exception occurs in the message processing – the sub-process is called. In the sub-process, we modify the details of the fault message.
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 3/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
1. We have included the following tag ${exception.message} in the Content Modi er step.
2. We have used Message End in the exception sub-process.
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 4/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
If I change the End Message to an Error End, the response structure shall change. The exception shall go as part of the SOAP fault message.
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 5/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Optionally, you can choose to send the exception message to another endpoint.
Example – the sample integration ow we just saw has been modi ed to to send the exceptions to an SFTP location –
That is all for the exception sub-process! Try it out, and let us know if you have any questions.
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 6/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Best Regards,
Sujit
Alert Moderator
Assigned tags
SAP Cloud Platform Integration for process services | cloud integration | exception handling | exception subprocess | hci |
View more...
Dev 10 Blog: Ten Developer Blogs on SAP Cloud Platform Integration (f.k.a HCI)
By Sujit Hemachandran , Nov 28, 2014
Landscape components of SAP Cloud Platform Integration
By Sujit Hemachandran , Jan 13, 2015
What's New in SAP Cloud Platform Integration Webinar Series
By Anette Asmus , May 08, 2017
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 7/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Related Questions
14 Comments
Che Eky
Like (0)
Hi Che,
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 8/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Best Regards,
Sujit
Like (1)
Former Member
Hi Sujit – If I want to have multiple exception blogs on particular pipeline step is that possible if so how to invoke the appropriate exception block in that case ?
Also is it possible to catch the exception and continue the remaining process/pipeline steps in the process ow ?
Thanks Again
Rajesh
Like (0)
Former Member
Hello Rajesh,
You can try using the gateway step to check the exception details and handle it di erently in one single exception handler, as it is not possible to add more than
one exception handler to an iFlow.
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 9/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Also I do not think it is possible to continue alternate processing ow in case of an exception, you may try adding the required processing steps inside the
exception handler itself and see if it works for you.
Regards,
Diptee
Like (0)
Former Member
Like (0)
debasis mohapatra
Regards,
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 10/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Debasis
Like (0)
Devaraj R
we have around 60+ integrations in our tenant and mail noti cation should be triggered immediately to our support mail box when each message failure
occurring in HCI for all these integrations.
Any other ways to con gure this Exception sub process in common place/integration in HCI tenant and accessing this in all these integrations, instead of
con guring this Exception sub process explicitly in all these 60+ integrations.?
Plz let me know if any other solutions as well if it will work out here.
Regards,
Deva
Like (0)
Former Member
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 11/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Hi Devaraj,
Did you get any solution for the above requirement. I have same requirement.
Like (0)
Former Member
We process multiple records in one i ow using a general splitter – however some of them may fail in the target system.
If I catch an exception returned by the target system (soapfault) in my exception subprocess I have to end it with either End Message or Error End – which in
both cases will stop further processing! And I do not want that – I want to send an email from within the exception subprocess and move on to the next item in
my splitter – is that not possible in HCI ?
Like (3)
Did you solve this? I am facing the exact same issue and do not ne a solution to it. Especially, because a gather step does raise an exception as well (some
XML Parsing error).
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 12/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Like (0)
Former Member
So we have main ow (MF) which calls Target system (TS) multiple times (using general splitter). We’ve created additional ow (AF) in HCI which is used only
for calling TS. So E2E it looks like:
MF -> AF -> TS
Now, whenever TS returns an error, AF catches this error in Exception Subprocess and prepare nice response for MF. Something like:
<AFresponse>
<status>ERROR</status>
<description>${exception.message}</description>
</AFresponse>
MF checks status node and in case of ERROR we have router to send an email. If status is SUCCESS we’re continuing processing other records.
Like (3)
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 13/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Like (0)
Former Member
Hi Daniel,
Did you solve this? I still didn’t get the last part of Pawel’s explanation.
Like (0)
J. Evertse
Anyone had a situation where the exception.detail is not available? And tried to add a router condition to check for this, like ${exception.detail} = null ?
Like (0)
Find us on
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 14/15
1/28/2020 Blog 4: Modelling Exceptions in Integration Flows (SAP Cloud Platform Integration) | SAP Blogs
Newsletter Support
https://blogs.sap.com/2015/01/12/blog-4-modelling-exceptions-in-integration-flows-hci-pi/ 15/15