Skip to Content

Michal’s PI tips: Component-Based Message Alerting

Component-Based Message Alerting (CBMA) is the new way of sending alerts on SAP PI (either single or double stack) without the use of any additional components. CBMA is made of three componets:

a) Central configuration for creating alerts – alerts can be created in Integration Directory or in Netweaver Administrator

b) Alert Engine – which is supposed to evaluate rules and create alerts

c) Alert receivers (consumers) – components which can receive alerts from the Alert Engine

This first article about Component-Based Message Alerting will show how to create a typical alert configuration with an e-mail consumer which means that once the alert will get generated an e-mail with alert data will be distributed to the alert receivers.

Step 1 – Create alerts in Integration Directory

At first you need to specify a new alert rule and assign PI objects to that rule as shown in Figure below.


Specify alert severity, if the alert rule is enabled (or disabled) and if the payload should be included in the alert message.

Step 2

Specify which types of alerts should be included in the alert rule like for example all alerts from a single adapter type (file or jdbc), etc. You also need to specify an alert receiver (consumer) which in our case will be an e-mail service. Alert consumer does not need to be an e-mail service it can also be Solution manager or any other third party consumer (custom created), please refere to further reading section for other types of alert consumers. Once the alert is generated an e-mail will be distributed to the alert receiver.


Step 3

Configure alert consumer for e-mail notifications. There is a new JavaMail Client Service which needs to be configured on the in order to be able to consume alert messages on the JAVA stack. In order to make it work you need to set a few parameters there like smtp server, user, password and host for the e-mail server which will be distributing alert e-mails.

You can configure it with the use of Netweaver admin: Configuration -> Infrastructure -> Java System Properties -> Services – Java Mail Client

In the properties tab configure at least parameters like:

– mail.from


– mail.smtp.password

– mail.smtp.user


For more info on the parameters please have a look at: Configuring the JavaMail Client Service

Step 4

The last thing you need to do is to schedule a job that will be running and creating alert notifications from the generated alerts.

Open SAP Netweaver admin: Operations -> Jobs -> Java Scheduler -> Job Definitions

Next you need to add a new task for AlertConsumerJob job as shown in the Figure below.


Then you can fill out the necessary details in the task parameters (like from and to e-mail and consumer specified in the Integration Directory).


As a last step you need to define how often should your job be running – in my case it’s every 5 mins.


And you’re done with the configuration – now you just need to wait for alert to be generated on your PI system. 

Alert check at consumer’s inbox

Once the alert will be raised your configured alert receiver should receive an e-mail with the alert data similar to the one below.


Next episodes:

In the next episodes of about this topic I will try to concentrate more on other Component-Based Message Alerting topics like:

– error handling with alert configuration

– other consumer types

Further Reading:

Presentation for Component-Based Message Alerting with Solution Manager:

You must be Logged on to comment or reply to a post.
    • Hi Prateek,

      not that I know – I don’t even know if this will be downported to 7.3…

      but with 7.11 there is no single stack option so you’re free to use ABAP stack at it’s always there – with 7.3 you can have a single stack and no alert framework… unless you use another ABAP stack (like Solman).


      Michal Krawczyk

  • Nice info but i dont see option to create alert in ID in 7.3 from what version is this available can you addd the version details



  • Hi Michal, Just wondering how you think this compares to using a central monitornig server (CEN) for alerting (we don’t have 7.31 to play with)?

    i.e. For AEX 7.3 we can use an abap stack (solman for example) as CEN for alerting. What benefits do you see over this with the Component Based Alerting?



    • Hi Jason,

      >>>What benefits do you see over this with the Component Based Alerting?

      1. no need for an ABAP stack anymore

      2. very simple API for adding new alert consumers and for getting the notifications (will blog on that soon after I migrate all my old blogs to the new SOA space).


      we also had a presentation on that in GSIG for PI so you can get some more details from your local SAP PI user group representative.  Soon we might have some more on that at the GSIG too as this is one of the “most useful” features of 7.31


      Michal Krawczyk

  • Thanks for the details Michal.

    Any word on CTS+ enhancements? Currently it requires ABAP stack to configure and operate CTS+.


  • Hi Michal,

    Are there any special authorisations r function units,  or special CTC templates required to be able to use the default local consumer on JAVA AS? 

    Im trying to configure CBMA on our 7.31 PO system: I have created and activated a rule and I have scheduled the AlertConsumerJob with consumer “ALERT-TO-MAIL”.

    However , I don’t see that my rule has the consumer “ALERT-TO-MAIL” and I also don’t have an option ( in either NWA or ID ) to add a consumer to the rule. ( in your screen shots you have a “plus” sign to be able to add a consumer to a rule” )

    I then went looking for the  RegisterConumer web service , but could find find that on our system at all. 

    Any idea what I might be missing?

    Kind Regards


    • …Ok So this is what i was missing:

      – To be able to add the ALERT-TO-MAIL consumer in ID , one needs to : ” To enable the adding of new consumers, you need to activate the  Edit  Add Consumer  option
      ”   ( Although this seems to only be avialable in ID and not in NWA )

      – RegisterConsumer is an operation of the service AlertRuleIn.



      • Quick question, how can I enable the default consumer and also how can I create a new consumer? Is it because of missing CTC configuration?

        For some reason in ID, the edit button to add consumer is disabled. Nor can I find the default ALERT-TO-MAIL consumer.

        Adam Smith wrote:


        …Ok So this is what i was missing:

        – To be able to add the ALERT-TO-MAIL consumer in ID , one needs to : ” To enable the adding of new consumers, you need to activate the  Edit  Add Consumer  option
        ”   ( Although this seems to only be avialable in ID and not in NWA )



  • Many thanks for the informative blog Michal!

    I was wondering if there is any option in 7.31 where you can alert based on certain criterias.For example, in my scenario I am sending multiple information to the target system (e.g. Rota, Patient information, acknowledgement) but I would like to raise alerts only when the message type is Acknowledgement.

    Can you please let me know how to handle such situation?



  • Hi,

    We tried to implement Component Based Message Alerting following the steps which you have mentioned in your blog. Ours is PI 7.31 dual stack. However, after setting up the job with my own user id, I am getting the below error inside the log of Jobs tab :

    javax.jms.JMSSecurityException: You do not have permissions: action alertingVP.queue and instance:name alertingVP.queue

    action consumer

    instance jms/queue/xi/monitoring/alert/ALERT-TO-MAIL

    Please let us know what permission is required to set up the job.



  • Hi Micheal,

    Nice blog… We have PI7.31 dual stack…. Can I use Alert Rule in dual stack?? Will it give alert mails in inbox as here its dual stack not aback stack…..

    Please reply…



  • Hi Michal,

    Indeed its a good knowledge share. We are using PI 7.31 dual stack, we will make sure we deploy this. Waiting for your next episodes 🙂



  • Hi Michal,

    Nice blog. We have implemented the same and facing the error as

    javax.mail.messagingException: Could not connect to SMTP host : XX.XXX.XX.XX ,port : 25, response:421

    We are using the default consumer ALERT-TO-MAIL.

    Please suggest if any settings to  be done.

    And mentioned the default mail ID in To address as “



  • Hi Michal,

    I saw the Payload in Alert is enabled above.

    I want to know where we can find the payload.

    It is attached as one document in the mail or just one link is given in the mail.

    I am working on the alert configuration, but I didn’t get the message payload, even I have enabled “Payload in Alert” in Alert Rule,



    • Hi Sep,

      I know Michal is a busy guy and I happen to know the answer to your question:

      That “Payload in Alert”checkbox is a little misleading…by checking that check box you don’t get the whole payload in the alert, what you do get is the values of fields which you have defined as User Defined Searches for the interfaces for which you are defining alerts.



  • Hi guys,

    at first, thanks a lot for this great blog Michael, indeed i liked it very much. You and William are my favorite contributors on SCN 😉 .

    We are preparing migration to PO right now, and we want to start with a generic alert rule which informs us about any error happening on PO, before we are digging deeper in SolMan. But how can we do this? As far is i have seen, you are forced to add object information (iFlow, BC, BS…) to rule, when you want to receive alerts about e. g. failed receiver determination. Any idea how it is possible to generate a “default rule” which alerts everything?

    We could add for instance all iFlows by hand, but this is not very convenient!

    Kind regards,


    • Hi Markus,

      in order to create a default alert rule for every Integration Scenario, you can select the Checkbox “Create Default Rule” when you create a new rule in Integration Builder. (Right click on Alert Rule -> New Alert Rule -> Then select the Checkbox in the wizard).

      Kind regards,

      Philipp Domeratzki

      • Hi Domeratzki,

        thanks for your help, i found it already in NWA. You can create the default rule there as well. And it works 😉 …

        Kind regards,


  • Michal,

    Is there any option to edit existing alert tasks? I need to add more mail IDs to existing alert tasks.

    Operations -> Jobs -> Java Scheduler -> Job Definitions

    in Tasks tab…

    Since I was not able to add new Mail IDs, I am removing the alert and recreating with new mail IDs.

    This is awkward… I guess there are some other options to do it… What do you say!


  • Hi Michael,

            Great Blog! Finding time to help others is even more awesome. I am trying to find a way to change the subject and Body of the emails because the standard error message is not user friendly and not legible. I don’t see an option in your blog either to do so. So could you tell me what is the way to change the body or Subject?


    Suresh Enchoor

  • Hi Michael,

    Thanks for blog. I am getting below error after all steps I followed :

    This error i saw in Job log. And i did not receive any email. Path to object does not exist. First

    missing component is [jms], the whole lookup name is [jmsqueues/alertingVP/jms/queue/xi/monitoring/alert/ALERT-TO-MAIL]

    Pls advise


    • Hi,

      If you got that error, it means no alerts generated for  consumer name ALERT-TO-MAIL and JMS queue  not formed…Once any alert generates, then the JMS Queue forms and alerts can be read from the queue and the job will trigger mails..

  • Hi Michal,

    Why is necessary to configure the JAVAMail client service. I am using PI 7.3 dual stack and with scheduling of background job RSCONNECT and SXMSALERT_SEND_VIA_MAIL, I am automatically getting mails in my inbox.

    Do you mean to say that JAVAMail client service is only needed when we have a single stack PI system ?



  • Hi Michal/Adam,

    Indeed its a nice blog and veryuseful.

    But how could we set the recipients different based on the many alert rules created and ofcourse the consumer we are using is the same i.e. ALERT-TO-MAIL.

    Please suggest.



  • Michal,

    I am little bit late in coming to this blog. However, could you please add the prerequisite that the component based alerting needs to be enabled in the system in order to get the alerts generated and forwarded to the respective JMS queues? The link to configure is here.



  • Hello Michal,

    I am 1 of ur follower. Sorry, I was trying to start a discussion directly, but i could’nt. Hence I am passing my query thro this Tip….

    I need to set an Alert for the messages which comes into PI queue with more than 5 MB size.

    We have already set a Queue (XBTL) which handles the messages that are coming with  > 5 MB size. Now we have to get an email alert if there is a message coming into PI with >5MB size irrespective of interface/status.

    Kindly let me know how to achieve this!?

    PI system: SAP PI 7.0 ; PRODUCTION system.



  • Hi Michal Krawczyk,

    There is one part of the Alert configuration that I have not been able to understand, regarding the relationship between and Alert Rule and the Job Task.

    Lets say we define 2 alerts for two different scenarios.

    The recipients of this alerts are two different support organizations.

    But the email address parameter is part of the Scheduled Job Task, which has no direct link to one or the other Alert Rule.

    How do I relate email distribution list to one Alert and one to the other?

    Or I am misunderstanding the capabilities of the default ALERT-TO-MAIL component.

  • Hi Michael,

    Thanks for the blog. It helped me working on alerts in single stack.

    I had 1 query. After setting up this alert, can I edit it at later stage? Eg. I was trying to add more email IDs in the ‘mail to’ but I do not get the edit/modify option. Is this user role issue.



    • Hi Harishit,

      Please help me out..How do u made it working?

      I am trying to configure the steps in PI 7.4 and I can observe the things I have explained in Alert Configuration in PI 7.4 Guidance Required   after Configuring.Can I able to see the Alerts in Run time Workbench>Alert Inbox?…How to make it working. Because I just want to check whether the alerts are triggering in PI side internally .



  • Hi Michael,

                     Thanks for the blog, I’m planning to upgrade PI 7.3 to PI 7.4(dual stack). Unfortunately my client still wants to retain dual stack for some existing interfaces.  can I able to use CBMA in 7.4 dual stack  (at least for ICO related interfaces?  Please advice.

  • Hi Michal / All,

    short question to get my head around this. When having a PI 7.4 AEX and a proxy receiver system NW ABAP 7.4:

    Is it possible to use CBMA for creating alerts of the proxy receiver directly?

    I know I could use Alerting Framework with setup like here but is there a “native” way?

  • Hi Michal, Thank you very much for sharing your knowledge with us . I have the following questions:

    1. I have performed all steps according to the blog but fail the errors of message mapping not send, other errors if displayed in the mail.
    2. Is there a way to change the structure of mail alert ?. I have seen that in version 7.31 there job “AlertConsumerJobV2 “which has the description “Simple alert consuming solution for generation of emails . Enhances and Replaces the job AlertConsumerJob. It offers additional parameters and the Possibility to use an email template” and is necessary to pass the parameter EmailTemplateFile. Thank you very much for your support.


    Daniel Valdivia

  • Hello Michal,

    Thanks for this nice blog. I have configured the Alert in NWA as per your blog and it is working fine.

    But my client has the requirement to add the File name in the Alert Mail.

    Please help me to add the File Name from Dynamic Configuration



    Sayanti Mukherjee

  • Hello Michal,

    I have created the AlertRules and assigned the custom Consumer and ICO for it.

    What if ICO is shared by more than 1 interface(In my case it is shared by 4 Interfaces).

    Do we need to add Communication Component, Service Interface etc in addition to ICO to the AlertRule?Please help.



  • Hello Michal,

    I have following requirement,so can you please confirm if we can achieve this either in PI7.1/7.3/7.4


    PI Alerts need to be routed to 2 different group ids’ (ex Group1 and Group 2)

    Group 1: should receive alerts during 9 AM to 9 PM only

    Group 2: should receive alerts during 9 PM to 9 AM only

    i.e., can we configure time based routing of alerts to differnt groups/persons.



  • Hi Michal. Thank for the great blog. My requirement is instead of Message monitoring URL which is present in the mail  payload have to be attached in the mail. i’m using PO 7.4. please advise how it can be achievable. Regards Ramesh

  • Hi Michael,

    Thanks for the blog, indeed a nice one.

    We are with PI7.4 dual stack. implemented CBAM following two your blogs.

    As per AlertConsumerJob the alerts are generated, but unfortunately they not arrived into my inbox.

    No logs are found except JOB (Job AlertConsumerJob (ID: bb8d1f129c9e11e5bd5f000000979d16, JMS ID: ID:5DF8010000000E12-00000000003B) ended on Mon, 7 Dec 2015 15:55:28:920 AEDT) NWA log viewer.

    Where/how can i trace where it went wrong?



    Thanks in advance,


    • In step 3 while configuring java mail client, set mail.debug “true” and check the log what went wrong while triggering your alerts to email inbox.

  • Hi Michal and others,

    I followed this blog to create alerts in my PO 7.5 system.

    SMTP parameters were set, Default Consumer Used. Alert consumer job running.

    I generate the error event,and can seee in log, but the alert consumer job is not picking it and forwarding to my email.

    Strange is the job completes some times and again Error times.

    When completed, i see below in log.

    “0 alerts were processed” and Successfully performed an alert consumer task.

    When error,

    javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client

    Has anyone faced this one.

    Thanks & Best Regards


    • Hi Venkat,

      we are also facing same type of issue in sap PO 7.5

      javax.mail.AuthenticationFailedException: failed to connect, no password specified?

      and in some jobs

      com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [BMXPR01CA0042.INDPRD01.PROD.OUTLOOK.COM]


      How did you solve this error,

      Please guide


  • Hi Michal,

    We are using PI 7.31 single stack.

    I have a very specific requirement on CBMA alert mechanism. In our case we are facing temporary channel failure and due to this we are facing lots of alert mails. This channels gets automatically up after sometime and messages started to flowing normally.

    I understand we can set the suppress to avoid duplicate errors during this temporary downtime, but is there any other option available by which we can trigger alert only after checking the channel status for a certain time and then if it fails say for 5 min, it will throw an alert.

  • Hi

    we are also facing same type of issue in sap PO 7.5

    javax.mail.AuthenticationFailedException: failed to connect, no password specified?

    and in some jobs

    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [BMXPR01CA0042.INDPRD01.PROD.OUTLOOK.COM]


    How did you solve this error,

    Please guide


  • Thank You for this great blog.


    We got this exception:

    Error occurred while submitting a job generated for task '8ff269f975f211e7b892000001a4fc76' to the Job Execution Runtime.
    Probably this expiration of the task won't be executed Uanble to start Job. JMS message could not be sent.
    , Job ->
      , JobDefName: AlertConsumerJob
      , AppName:
      , TaskId: 8ff269f975f211e7b892000001a4fc76
      , JobId: 9cbf6db2769711e7846e000001a4fc77
      , JobDefId: 52d2e7c89b4a11e4c4b3000000803b26
      , SchedulerId: e1f7a830a4a711dcc06c001708504156


    On our system the group Administrators was missing. After creating it the altering is working.