Skip to Content
Technical Articles
Author's profile photo prachetas singh

SAP Cloud Integration: Generate Alert if file not found in Sender SFTP Folder

Introduction

This document provides a way to leverage existing SAP Cloud Integration functionality to raise an alert when polling for a file from source SFTP Folder does not yield any results (Specified file does not exist in source folder).

 

To achieve this use case, we will use Poll Enrich pattern of SAP Cloud Integration.

 

Possible Solution

To understand the functionality of Poll Enrich Pattern please click here.

Apart from the use cases illustrated in above blog post we can also use poll enrich to raise an exception in case no file is found in source SFTP folder.

To Achieve this:

  • In the Processing tab of poll enrich select Aggregation Algorithm as Concatenate and Check the option Throw Exception if no Message Found.

 

Poll%20Enrich

 

Error Message received in Cloud Integration
org.apache.camel.CamelExchangeException: Error occurred during aggregation. Exchange[ID-5eb31a92-e4d2-46db-50e1-2fba-1642058552768-23-1]. Caused by: [org.apache.camel.RuntimeExchangeException - Polling with given parameters did not return any message.], cause: org.apache.camel.RuntimeExchangeException: Polling with given parameters did not return any message.

 

 

 

Conclusion

Doing this, whenever the specified file is not found in source directory, CPI iFlow fails in runtime and we can use this to catch exception using an Exception Sub Process and send an alert mail to the concerned team.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Shameer Shaik
      Shameer Shaik

      Hello ,

      By using poll enrich only one file will poll per execution.

      We have to poll multiple files from sender SFTP in one go, If files are not available in the server ,alert should be generated. Is there any workaround