In the first part, I covered the development needs to be done to get a customized alert. You can find first part below
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.
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 –
- 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.
- File Sender – To send the actual values of Consumer and number of alerts we want to send in one go.
- SOAP Receiver – It will call to standard webservice (Through Target URL)
- 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.
Output Mail –
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.