CPI MONITORING REPORT
To send monitoring report of iFlows running in CPI within a time period
via mail
Aayush Barolia
AGENDA
Create an iFlow which will generate the CPI monitoring report.
Report may contain details like CorrelationId, ApplicationMessageId,
LogStart, LogEnd, Sender, Receiver, IntegrationFlowName, Status,
LogLevel, CustomStatus, TransactionId etc. However, today we will be
considering only the success and failure count details.
At last, reports should be sent via mail as an attachment or as an Excel
file on file server.
OVERVIEW OF IFLOW Components required:
1. Start Timer
2. Content Modifier
3. Request Reply
4. Odata Adapter
5. Receiver 1
6. Message mapping
7. XSLT mapping
8. Mail/SFTP Adapter
9. Receiver 2
STEP 1: PACKAGE
CREATION
Create a new package in which
we want to build the iFlow and
save it:
STEP 2: IFLOW CREATION
Add the iFlow in the package
and fill the required details:
Open the iFlow and add below
components as shown in the screenshot:
STEP 3: ADDING Components required:
1. Start Timer 2. Content Modifier
COMPONENTS IN IFLOW 3. Request Reply 4. Odata Adapter
5. Receiver 1 6. Message mapping
7. XSLT mapping 8. Mail/SFTP Adapter
9. Receiver 2
STEP 4: START TIMER
CONFIGURATION
Configure the Start timer as
shown
STEP 5: CONTENT MODIFIER
CONFIGURATION
Configure the content modifier
as shown
STEP 6: ODATA ADAPTER
CONNECTION PARAMETERS
These are the configurations
needs to be done under
connection tab
STEP 7: ODATA ADAPTER PROCESSING
PARAMETERS
Below are the configurations needs to be done under connection tab
Operation Details Query (GET)
Resource Path MessageProcessingLogs
$select=IntegrationFlowName,Status&$filter=LogStart ge datetime'${property.From}' and LogEnd le
Query Options datetime'${property.To}'&$orderby=IntegrationFlowName
STEP 8: MESSAGE MAPPING
Create a new mapping as below
Mapping
STEP 11: XSLT MAPPING
Import below xsl file for xslt mapping to convert XML to Excel format:
XSL Stylesheet
STEP 12: MAIL ADAPTER CONNECTION
CONFIGURATION
Configure Connection parameters of Mail adapter as below:
Address smtp.gmail.com
Proxy type Internet
Timeout (in ms) 30000
Protection SMTPS
Authentication Plain User/Password
Credential name Mail ID credentails
STEP 13: MAIL ADAPTER PROCESSING
CONFIGURATION
Configure Connection parameters of Mail adapter as below:
From From mail ID
To To Mail ID
Cc Cc Mail ID
Bcc Blind Cc Mail ID
Subject CPI Monitoring
CPI Monitoring report from
${property.StartDateTime} till
Mail Body ${property.EndDateTime}
Body Mime-
Type Text/Plain
Body Encoding UTF-8
Name Mime-Type Source
Attachments CPIMonitoring.xls Text/CSV Body
MONITORING LOGS
Success Logs for CPI Monitoring Iflow
Mail Received in mail server
MONITORING LOGS
Success Logs for CPI Monitoring Iflow
Mail Received in mail server
MONITORING REPORT FILE
CPI Monitoring report file generated:
REFERENCES
➢ https://api.sap.com/api/MessageProcessingLogs/resource
➢ https://blogs.sap.com/2020/02/24/sap-cloud-platform-integration-automated-
reporting-for-message-processing-on-a-given-time-period./
➢ https://www.odata.org/documentation/odata-version-2-0/uri-conventions/
➢ https://blogs.sap.com/2016/11/25/get-to-know-camels-simple-expression-
language-in-hci/
THANK YOU
-Aayush Barolia