The exception subprocess in HCI PI is very useful in handling the exception when an error occurs in an iflow. This plays an important role as the alerting mechanism is not yet available in HCI PI cloud solution as compared to PI/PO. In the past, the ability to leverage this functionality in HCI PI was only possible through eclipse tool which is connected to HCI PI tenant and it came with few major limitations as listed below.
- Development has to be done in eclipse tool only to leverage exception subprocess and to be deployed on the tenant. This was not a feasible option for someone who is new to HCI PI.
- Development can’t be edited in the HCI web UI due to the usage of exception subprocess as it was not supported in HCI PI web UI.
- Using exception subprocess in the iflow would prevent editing of all other development components web UI HCI PI tool in which case the development had to be moved back and forth between eclipse and UI.
Note: The above statements are true if the development package is exported out of eclipse and imported into HCI PI web UI and not when you’re using eclipse as a primary development platform and deploying directly on to the tenant. The former and latter approaches come with some pros and cons which am not discussing in this blog.
Recently SAP has added 3 new functionality to SAP HCI PI web UI as listed below.
- OAuth functionality under security material
2.Creating OData service after creating initial integration package.
3. Subprocess Exception in HCI- PI mapping editor
In this blog, I will discuss the latter and former will be covered in future blogs. When you develop an iflow it would be necessary to have some kind of exception handling so that you can alert the business or support team about the issue before a business bottleneck occurs.
Exception subprocess can be found under local integration process as shown in the screenshot below.
Exception subprocess can be used as an individual process in your iflow which does not infer with your actual main integration process and gives you the flexibility to modify exception process as per business requirement of an individual iflow. The capability which I like to see in HCI PI is build, reuse and modify one exception process by calling it in all the iflow scenarios. This would eliminate redundant development effort. HCI PI offers a local service call to integration process but you can’t call an exception subprocess. For now, we need to live with what HCI PI has to offer.
After implementing the exception subprocess your integration iflow should look as shown in the screenshot below. In my scenario am sending an email to business users and letting them know that an error has occurred. In below configuration there are 2 things to note, First is to use a script to get the runtime URL and second is to use a content modifier step to send a message body in an email to users. I have referenced this blog https://blogs.sap.com/2017/01/16/sap-hcp-is-exception-sub-process-how-to-create-alert-body-for-error-notification/ by my colleague to get this subprocess exception configured in my iflow. You can follow similar steps to get this subprocess exception working.
Note: The development mentioned in the above blog was done in eclipse but can be applied in HCI PI web UI.
One last thing to remember, when sending an email to external servers the default port 25 is not supported in HCI PI. To send messages to external servers you need to use port 465 for STMPS or 587 for SMTP+STARTTLS. If you’re trying to test using your Gmail account you need to get all the SSL certs from Gmail into your key store and deploy the same on to the tenant. Gmail will only accept OAuth requests so you need to deploy the credentials in HCI tenant under security materials so that you can send messages from HCI PI. If you have not deployed the certs and credentials as required then you will receive SSL handshake error.
Hope this helps!
See you in my next blog!