This solution is providing the possibility to monitor message store entries of a SAP CPI tenant.
We know Staging & Logging in SAP PI/PO already, but SAP CPI provides different possibilities and is not persisting payloads by default. In addition, we see many consultants trying to achieve the same as in PI/PO by misusing the concepts of CPI.
Using the Persist Message step at design time is THE way in SAP CPI to store a message into the tenants database. It can be called at any point during the message processing and store several message versions at runtime.
The messages are persisted for 90 days in the store so this is clearly a monitoring scenario (but still not an archiving solution). SAP Help
Unfortunately SAP does not (yet) provide a UI for this useful feature, so we consumed the API and created a simple UI5 app which we are now sharing with the SAP CPI community.
- Update: Google Chrome Extension (05.2020)
Logging the Payload in the MessageProcessingLog (MPL) is widely used by consultants, but this is not a secure way at all to store messages and should not be used extensively!
You can easily deploy it on your CPI tenant:
- Download the ZIP archive and navigate into the Account Cockpit (https://account.hana.ondemand.com) to Applications -> HTML5 Applications
- Import the Archive and provide a name and version
- Create a destination, directly at subaccount level with the name MessageStoreAPI.
- Copy the tenant management node URL with /api as the suffix (e.g. https://<tenant>-tmn.hci.<datacenter>.hana.ondemand.com/api)
- Select AppToAppSSO as Authentication
Activate the Version using the magic stick symbol.
Open the Application URL. Any S-User can access the application.
An authentication popup appears. Please select your S-User which has monitoring authorization and enter the password.
Now lets test the MessageStore Viewer!
For demo purposes we created a sample iFlow which persists the message 3 times:
Each MessageStore Entry contains
- Properties (Message Header & Exchange Parameters)
The payload is shown in a separate browser tab:
Avoid using the MessageProcessingLog to persist payloads! SAP even implemented a “circuit breaker” to stop writing the MPL attachments when 1 GB per day is reached (depending on the amount of iFlows this can be reached quite quickly), so do not rely on it.
Using the Persist Message step to write the complete Message into the Message Store is the clean design for each development in SAP CPI. Until SAP delivers a navigation from the monitoring with a standard UI to display the store, please feel free to use our tool!