This blog describes how to create and handle dynamic alert notification inside the Exception Sub Process in SAP HCI.
About Exception Sub Process:Exception Sub Process can catch any exceptions thrown in the integration process and process them.Below parameters will give more details of the the exception raised.
${exception.message} : Short description of the Exception.
${exception.stacktrace} : Complete trace of the Exception raised.
Use Case:
Lets create Custom integration where we will pull the File from SFTP server and save it in data store.
1. Sender: Add Sender component from integration designer pallete.
2. Channel: Configure SFTP sender channel which picks file from SFTP server.
3. Content Modifier: To read the key details of incoming message.In our case we are capturing input file name.4. Script: To read the tenant details in run time( in our case tenant id is of 5 character length like X1234 ,L1234 ) and stores it in property.
5. Script: Erroneous script to forcefully fail the message and trigger exception.
6. Data Store: Store the output ( In the above case its just added to have an end to end flow ).
7. Content Modifier: Content Modifier [ Body ] to build the email body.
Content Modifier [ Header ] to set the exception stack trace into header which is later sent as a attachment.
8. Send: Send step is used to send the message to External Systems Asynchronously.
9. Channel: Mail adapter to send the exception details to mail receiver.
Once you are done with above configuration save and deploy the Integration Project.
Place a test file in SFTP share and you will be able to find the below Error Alert Mail triggered from Exception Sub Process.
Further Improvements and Limitations:1. XSLT mapping with HTML can be used in addition to above use case inside the Exception Sub Process to improvise the look and feel of the email body.
2. Custom Exception can be created and raised using Groovy Script.
3. You cannot catch exceptions of local integration process in the main integration process.
4. As of now Exception Sub Process is not available in WEBUI( may be it is present in the SAP road map ).
Conclusion:Exception Sub Process is very useful for handling Exceptions raised in Integration process although it requires further improvements.
Thanks Sriprasad for knowledge share.
About Exception Sub Process:Exception Sub Process can catch any exceptions thrown in the integration process and process them.Below parameters will give more details of the the exception raised.
${exception.message} : Short description of the Exception.
${exception.stacktrace} : Complete trace of the Exception raised.
Use Case:
Lets create Custom integration where we will pull the File from SFTP server and save it in data store.
1. Sender: Add Sender component from integration designer pallete.
2. Channel: Configure SFTP sender channel which picks file from SFTP server.
3. Content Modifier: To read the key details of incoming message.In our case we are capturing input file name.4. Script: To read the tenant details in run time( in our case tenant id is of 5 character length like X1234 ,L1234 ) and stores it in property.
5. Script: Erroneous script to forcefully fail the message and trigger exception.
6. Data Store: Store the output ( In the above case its just added to have an end to end flow ).
7. Content Modifier: Content Modifier [ Body ] to build the email body.
Content Modifier [ Header ] to set the exception stack trace into header which is later sent as a attachment.
8. Send: Send step is used to send the message to External Systems Asynchronously.
9. Channel: Mail adapter to send the exception details to mail receiver.
Once you are done with above configuration save and deploy the Integration Project.
Place a test file in SFTP share and you will be able to find the below Error Alert Mail triggered from Exception Sub Process.
Further Improvements and Limitations:1. XSLT mapping with HTML can be used in addition to above use case inside the Exception Sub Process to improvise the look and feel of the email body.
2. Custom Exception can be created and raised using Groovy Script.
3. You cannot catch exceptions of local integration process in the main integration process.
4. As of now Exception Sub Process is not available in WEBUI( may be it is present in the SAP road map ).
Conclusion:Exception Sub Process is very useful for handling Exceptions raised in Integration process although it requires further improvements.
Thanks Sriprasad for knowledge share.
No comments:
Post a Comment