CPI Extensibility – Enhanced UDMS
This is Part 2 of this blog series. Part1 can be found here.
In this blog, I am going to discuss an architectural solution for achieving user defined message search (UDMS) in SAP cloud platform integration (CPI). UDMS is one of the aspects of integration monitoring where you can search messages through business data. UDMS can be configured out of the box in CPI using SAP_ApplicationID. Please find below blog form Eng Swee Yeoh for details on this and many other helpful tips.
If there is a need for enhanced UDMS where integration messages need to be searched with multiple business data elements, below is one of the approach we can take to build a custom CPI extension using different services of SAP Cloud Platform (SCP).
Integration Flow Overview:
The integration flow below is a simple integration scenario explained in SAP tutorial below.
I will explain the details of enhanced UDMS (steps 1 – 5 highlighted in the diagram below), while other parts of the integration flow is quite standard and explained in detail in the tutorial.
Using content modifier step, get the interface business data (here CustomerName, OrderID, OrderDate), MessageId, and CorrelationId as exchange properties as shown below:
Using sequential multicast step, send the first message to UDMS Receiver and the second message to the actual Receiver.
Using content modifier step, create message body JSON message payload for sending UDMS data to UDMS receiver. This payload will have ScenarioId, MessageId, CorrelationId, an array of UDMS key and values as shown below. The MessageID, CorrelationID and UDMS values are populated from the exchange properties from Step1.
Using AMQP Adapter, Send the UDMS payload data (shown above) to SCP Enterprise Messaging Queue.
Below blog from Dries Van Vaerenbergh explains configuring AMQP adapter for SCP Enterprise Messaging service.
For more details on AMQP Adapter functionality in general, refer to the below blog from Mandy Krimmel
Note: A Queue should be created in the SCP Enterprise Messaging instance as below.
Send the Payload to actual receiver. In this example, Message Payload is sent to an email receiver.
Custom CPI Extension:
The CPI custom extension picks the messages from enterprise messaging UDMS Queue and save them in SCP HANA database. The extension application enables to search messages based on UDMS by getting message processing logs from CPI API and UDMS data from SCP HANA database.
The CPI API for getting message processing logs is below
Running three test payloads with following Business Data
All messages sent to actual mail receiver like below:
The UDMS search looks like below:
The blog should provide an architecture solution that can be implemented for enhanced UDMS requirements in CPI. This shows how CPI functionality can be extended using services of SCP. There can be other ways to achieve similar requirement. I would love to hear your feedback, comments and suggestions.
Thank you and have a great day..