It is very difficult to understand the SAP PI alert JSON message sent to functional/business users. Business users keep asking about the key attributes for alert is generated. This requirement normally takes some custom development for earlier PI versions but for new CBMA alerts we have UDS attributes, which takes cares of this requirement.

At least, adding these attributes will let business/functional team know that for which key values errors occurred and they can contact technical team or by looking into alert error text, can take further action.

Business requirement

  1. Alert messages are not readable or very technical
  2. Not sure for which key fields error occurred
  3. PI Admin takes time to find messages for particular key
  4. Key/Payload based search of messages
  5. Message Monitoring Enhancement

For example – If we are sending PO information to our partner and mapping error occurred, then alert message should contain PO number as UDS attribute so that business and functional team should be aware of PO in error and take further action.

How UDS attributes will look like in CBMA alert message?

After setting up UDS attributes in NWA, alert messages will contain additional field at end of the message called UDSAtrrs {}.

“UDSAttrs”: {“PO Number”: “12345678”}

How to setup UDS attributes in NWA and enhance message monitoring?

Below are the steps to setup UDS attributes in NWA.

Step 1 – In NWA, goto SOA->Monitoring-> User-Defined Message Search Configuration

UDS1.PNG

Step 2 – Click on new in next page.

UDS2.PNG

Fill all details in next page – Name and description – you can fill anything to identify this UDS attributes.

Click on create to make it editable and then fill with relevant values for Sender party, Component, receiver party and component, with interface and Namespace. Select status as active and save it.

UDS3.PNG

After saving this, we need to define search criteria.

Step 3 – Click on new to create search criteria

UDS4.PNG

In Create search criteria provide Name, Description and XPath. Save it once done.

UDS5.PNG

It will look like below.

UDS6.PNG

You are done here with UDS configuration.

Benefits of UDS configuration –

1. A simplified monitoring in Message Monitoring

Go to Message Monitoring – You will see an additional tab for the interface you configured UDS attributes as below –

UDS7.PNG

When you go to this tab, you will see the values from Payload for which you have defined the search criteria. In above case, the PO number.

UDS8.PNG

2. User Defined search criteria and reduced search time for messages

In message monitoring, now you can use user defined search criteria to find particular PO number from all messages processed for the day or any other time variations.

UDS9.PNG

You can use User-Defined Search Criteria as below – Check User-Defined Search Criteria and click on Add Predefined to select Interface and provide User-Defined Search Criteria for interface and then value and select Ok. It will look like this and then you can click on go, to find message in particular time-frame.

UDS10.PNG

UDS11.PNG

udsmissed.PNG

UDS12.PNG

How UDS attributes will look in CBMA alerts?

Below is the screenshot of the UDS attribute in CBMA alerts sent to users/admins mailbox once UDS configuration is done.

UDS13.PNG

Reference:

Michal’s PI tips: How to trigger an alert for Component Based Message Alerts (CBMA) via “API” ?

To report this post you need to login first.

5 Comments

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

  1. Anil Tripathy

    Hi Aashish,

    We are using PI 7.4 SP 10 , We have tried to setup the UDS attributes ,

    1. Not able to get extra Tab for User-Defined Attributes in Message Display section.

        Are there any other config to be done for that other than mentioned in the blog above.

    2. Even not able to get the extra details in the alert mail like PO Number in the above case.

         we have defined proper search criteria and xpath of the source message field, and also        selected Payload in alert during Alert Rule config.

       Could you please let me know any further details you have on this , We also want to achieve a custom message in the Alert without any ESR API development .Do let me know if you have come across any other alternatives.

    Thanks

    Anil Tripathy

    (0) 
    1. samir BOUSSELMI

      Hi Anil,

      Are you using in your task the classic job AlerConsumerJob ?

      Maybe you can also try the new delivered one from SAP AlertConsumerJobV2 (Please refer to Note 2088606) where you can use the variable $uds_attribute$ in your alerting template.

      Another point, in your UDS, have you defined a namespace prefix before activating the filter? please check also the indexing and start it.

      Regards,

      Samir

      (0) 
  2. Nidhi Srivastava

    Hi Aashish,

    I tried implementing the UDS in the same way but not getting UDS tab in monitoring.

    UDS_Issue.jpg

    Also, added the indexing option.

    UDS_Indexing_Option.JPG

    Please suggest what I am missing?

    Thanks,

    Nidhi

    (0) 

Leave a Reply