With ABAP stack alerting it was possible to generate an alert using a function module which could be called from many different places (message mapping – RFC lookup, adapter module, abap proxy etc.). like shown in other blogs:

How to raise alerts from ABAP Proxy

For Component Based Message Alerts we currently don’t have an API which would allow trigerring alerts. Does not mean however that we cannot easily create it on our own. In this article I will try to show a concept which shows how to create a simple “API” for generating custom alerts in CBMA.

General idea:

Create HTTP callable integration flow which will server as an alert service.

Implementation:

a) create an integration configuration (ICO) flow which will always fail (for example wrong condition in receiver determination)

b) use a XML structure which will hold all the information details which you want to see in the alert monitoring for example:

<MessageID>

<InterfaceID>

<Priority> 

c) as we want to be able to call this “API” from many different places use SOAP (HTTP) as an outbound adapter (this way we can call it from majority of the applications)

d) create an alert rule where you add the ICO created above as an object to be monitored and make sure you select the field “Payload in alert” is set to enabled

/wp-content/uploads/2014/03/api_pic1_403495.png

e) create user defined message search on the outbound service interface for all important fields which need to be monitored

/wp-content/uploads/2014/03/api_pic_2_403494.png

Testing:

a) call the your ICO via HTTP from any kind of tool (like soapui) and populate the xml with the alert related info.


<MessageID>123114214</MessageID>

<InterfaceID>MICHAL_KRAWCZYK_TEST_API</InterfaceID>

<Priority>HIGH</Priority>

b) inside the Message Monitor you should be able to see all relevant details as shown below

/wp-content/uploads/2014/03/api_pic3_403493.png

c) when you receive the alert it should also contain all the important information (as user defined attributes) which you wanted to pass to the alert

/wp-content/uploads/2014/03/api_pic4_403486.png

Conclusion:

This is the alternative way to be able to receive all kinds of alerts with alert specific information.

Drawback : Clean up jobs.

If you use this approach you need to remember to take care of the failed messages (cancel them) as in standard failed messages will not get archived.


Reference:


How to use CMBA – Michal’s PI tips: Component-Based Message Alerting



To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply