cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the long text dynamically based on the payload in the Alert configuration

0 Kudos


Hi Experts,

Currently I am working on the scenario in which I need to send the number of records available in the xml file in the mail using Alert configuration.

I am getting a file like this

<HEADER></HEADER>

<RECORD></RECORD>

<RECORD></RECORD>

<RECORD></RECORD>

<TRAILER><RECORD_COUNT>3</RECORD_COUNT></TRAILER>

If number of records present in the file doesn't matches with the RECORD_COUNT present in the trailer, I am not mapping the root node, so message mapping is getting failed and triggering an Alert.

In this Alert mail, I need to send the RECORD_COUNT present in the file and actual number of the record by counting the record node as well.

E-mail will be "Number of records doesn't matches with the RECORD_COUNT".

Please provide suggestions on how to get these values dynamically in the long text of the Alert.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

RaghuVamseedhar
Active Contributor
0 Kudos

Vaibhav,

Put this logic in UDF, when mapping root node. Add Error message in alert configuration. Alert email will contain correct error message.


if (Records!=Record_Count){

            throw new RuntimeException("Number of records doesn't matches with the RECORD_COUNT." + "Number of Records in input is"+ Records +"But RECORD_COUNT is " + Record_Count);

        }

Another option,

Trigger email from UDF. Link.

0 Kudos

Hi Raghu,

Thanks for the quick reply.

I am able to trigger mail based message mapping failed but error lines will contain all the details related to the mapping failure. Is it possible to suppress the other messages in the container element SXMS_TO_ADAPTER_ERRLINES[] and just show the exception which we have raised in the same.


RaghuVamseedhar
Active Contributor
0 Kudos

Vaibhav,

I don't think, it is possible to suppress some part of SXMS_TO_ADAPTER_ERRLINES[].

Try,

Option a) Trigger email from UDF. Link above or search SCN.

Option b) Extended Receiver Determinations, when count does not match call mail scenario, when count match call normal target scenario.

0 Kudos

Hi Raghu,

Thanks for the response.

Issue is resolved now with the UDF for the message mapping, link which you have provided.

Answers (0)