cancel
Showing results for 
Search instead for 
Did you mean: 

Throw Alert from Mapping

Former Member
0 Kudos

Hi,

We need to check some mandatory fields in our source structure and throw an alert when they are not present. I have gone through some old threads/blogs for this Where most of the times we are throwing an exception from mapping which brings entire mapping process to end.

But in my case i need to throw an alert saying mandatory field X is missing and my mapping also should proceed on to create the target file.

In short i should send an alert mail for missing fields and also should create the target file. Can any give some idea on this?

TIA

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member192851
Active Participant
0 Kudos
nabendu_sen
Active Contributor
0 Kudos

Hi Prabhas,

Alert is generated when failure happens not for warning. But you can send mails by configuring mail adapters. But very first we need to know what is exactly your scenario and whether it would be possible or not.

Former Member
0 Kudos

I have a mandatory field A in header with occurance 0:unbound... For example a file is genearated with six segments and one segment doesn't contain field A then it should throw an alert sayig mandatory field is missing. But File should be created with rest of 5 segments...

nabendu_sen
Active Contributor
0 Kudos

OK, So sender is File, please let me know what is the Receiver Communication.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Prabhas,

Your requirement very much possible using JAVA mapping, if you want to do only one field valdiation then you dont need JAVA mapping,using standard function it self you can perfrom validation.

Create Mail adapter as a one more receiver and write a condition in receiver determination to call mail adapter bussiness compoenet.

And write a mapping logic to validate mandatory frield and include customized message in mail subject.

search in scn...

Regards,

Raj

Former Member
0 Kudos

Receiver will be JMS(xml file)..

nabendu_sen
Active Contributor
0 Kudos

Hi Prabhas,

You just need to add a BS as an additional receiver in your Receiver Determination and add Operation Mapping in Interface Determination to populate Mail body and header details.

For Java mapping please check the below blog:

Mail without Adapter

Former Member
0 Kudos

Hi Prabhas,

Can you let us know the scenario, you would like to work on.

If your source is ECC, then you can handle the issue in proxy and trigger an alert email saying that the mandatory fields are missing based upon the coding. This doesn't allow you to send the message to PI also.

But if the source are some other like File etc, then perform your mapping and in the message interface, keep an additonal mapping for the fault message interface mapping to send data to the target.