Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
aashish_sinha
Active Contributor

In the first part, I covered the development needs to be done to get a customized alert. You can find first part below

Customize E-Mail Body and Subject in Alerts in SAP PI 7.31 – Java Stack Only – Part 1 – ESR

In this part, I will talk about the configuration of this scenario.

We are going to configure a File – Sync SOAP – Mail scenario. To configure this scenario, I am using below beans to get response from SOAP and then send that response to recipients using mail adapter.

  1. RequestResponseBean
  2. ResponseOnewayBean

  I have used these beans earlier for scenarios like File – JDBC/RFC/SOAP – File receiver and without much effort it works. But if you change receiver adapter other than File receiver it starts giving errors. I want to take this opportunity to give solution to the errors we receive because of usage of above beans.  

Standard errors you will get when you use these beans are –

  1. CPAObjectKeyException for ResponseOneWayBean

I have seen some threads open with these errors or similar errors due to these bean usages.

Solution of above exceptions is configuration of bean in module tab. We should do configuration like below screenshot.

Now I will move to configuration. I have created one business component BC_Alerting, where I will create my communication channel.

We need to create 3 communication channels.

  1. File Sender – To send the actual values of Consumer and number of alerts we want to send in one go.
  2. SOAP Receiver – It will call to standard webservice (Through Target URL)
  3. Mail Adapter – It will send webservice response to correct recipients.

File Sender Adapter Configuration – Only showing module tab in below screenshot.

SOAP Receiver Adapter Configuration –

You can get target URL from Service Registry and search for *alert* and then you will get Service Interface related to alert.

Mail Receiver Adapter configuration – I am not doing any conversion here but we can do it anyways. So output through mail will go as attachment and in XML format.

Create an ICO for this with Sender Adapter as File Sender and receiver adapter as SOAP Adapter.

Activate all objects and we are ready to test it.

Source Message

Output Mail –

Attachment –

This is one of the solutions we think of. It may vary from person to person. This solution can be customized more depending upon the requirement.

16 Comments
Labels in this area