cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI - How to create one summary log file and send it to business owner

mark_st
Explorer
0 Kudos

Hi,

I would like to know how to approach following requirement.

Input csv file is read. Each record is validated and processed and written in one big output csv file (splitter/gather).

The validation result of each record needs to be written in one summary log file and mailed to the business owner.

How can I achieve this ? Thanks for any help or advice !

mark_st_0-1708251509951.png

 

View Entire Topic
karthikarjun
Active Contributor
0 Kudos

Hi Mark - Well, you can use the mail adapter in the SAP Integration Suite to send the report via email. 

Refer: https://community.sap.com/t5/technology-blogs-by-members/sap-cloud-integration-custom-email-notifica...

Moreover, you can use the Groovy script to validate the records. 

Regards,

Karthik A

mark_st
Explorer
0 Kudos
Hi Karthik, the part that is unclear to me is how to build the email message containing the validation errors of all the invalid records. Each record will be validated using a groovy script between split and gather process. At the end of the complete process one summary mail needs to be send. I am new to CPI and Groovy. If I program such a logic in another tool, I write during validation process for each record the validation result in an array. At the end of the process, after processing all the record, I build the mail body based upon the array and send it out. How should I do this in CPI/Groovy ?