cancel
Showing results for 
Search instead for 
Did you mean: 

On mapping validation send e-mail on errors

d_mccarthy
Explorer
0 Kudos

I would like to be able to send an e-mail if the mapping comes up with an error.

I have a field (Supplier ID) and if its blank during the message mapping I want it to send an e-mail.

I have all the objects ready to send emails e.g. Mail adaptor etc, but need to know what to do in the mapping and how this works?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi McCarthy,

I would like to be able to send an e-mail if the mapping comes up with an error.

Yes, this can be done from mapping.

I have all the objects ready to send emails e.g. Mail adaptor etc, but need to know what to do in the mapping and how this works?

Create a UDF and raise an exception if field is blank. Use Alert to capture this exception and send mail.

My advice is not to use this in mapping. Check this in an adapter module or enhanced receiver determination and then you can easily route it to a mail receiver if not okay.

If you want to use it in mapping, then it cannot be achieved without BPM.

Hope this helps.

Regards,

Neetesh

d_mccarthy
Explorer
0 Kudos

Do you have some examples I can look at?

Former Member
0 Kudos

You can code something like this -

if(Supplier_ID.trim().equals(" "))

throw new RuntimeException("Supplier ID is blank");

else return Supplier_ID;

Now in BPM, catch this Runtime Exception and trigger email.

No need to use try and catch in the UDF.

But why you want to check this in Mapping? Making it at Extended RD level will make things simpler.

Regards,

Neetesh

Answers (1)

Answers (1)

Former Member
0 Kudos

I would like to be able to send an e-mail if the mapping comes up with an error.

If it is based on a set-of predetermined fields, then u can use a UDF to make those validations before raising the alert in teh EDF..

But if it a runtime exception, then u need to rely on alert rules to raise alerts...

I have a field (Supplier ID) and if its blank during the message mapping I want it to send an e-mail.

If it is only1 field, You can do this check in receiver determination (Conditional rx det)...

If "supplierID" is blank, the receiver is Mail_server... Else continue processing using regular_business_system..

-Siva Maranani

d_mccarthy
Explorer
0 Kudos

This all sounds great!

Do you have any examples of these scenarios?