cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt with Receiver Determination

Former Member
0 Kudos

Hi,

Is it possible in Receiver Determination to suppress few data from the input xml and send out rest of the input data into mapping?

Example:

Input xml:

<EmployeeData> (1..1)

<Record> (1..unbounded)

<EmployeeData>

<Record>

<Name>Employee1</Name>

<ID>111</ID>

<Unit>AA</Unit>

</Record>

<Record>

<Name>Employee3</Name>

<ID>333</ID>

<Unit>BB</Unit>

</Record>

<Record>

<Name>Employee2</Name>

<ID>222</ID>

<Unit>CC</Unit>

</Record>

<Record>

<Name>Employee4</Name>

<ID>444</ID>

<Unit>DD</Unit>

</Record>

</EmployeeData>

In this case, Records with Unit as BB or CC should be ignored, rest of the Records has to be sent into the mapping.

Is this possible in Standard Receiver Determination?

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Is it possible in Receiver Determination to suppress few data from the input xml and send out rest of the input data into mapping?

Your requirement can be handled easily in the mapping. In Receiver determination , you decide the destination receivers based on the value of your payload using XPath.

Former Member
0 Kudos

Thanks Shiladitya, Bhaskar for your replies.

Now my question is if I have an input xml with all the Records having Unit as either BB or CC, in this case i should not determine the receiver and cancel the message processing.

another case would be like with above sample xml, which has both valid and invalid(BB,CC) values. Since there is at least one valid record, I should determine the receiver and in mapping i will suppress the invalid records.

Can you please suggest me if this is possible in Standard Receiver Determination?

I know this can be handled in message mapping/Extended Receiver Determination

My objective is to stop processing the message using Standard Receiver Determination if entire input is invalid.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>My objective is to stop processing the message using Standard Receiver Determination if entire input is invalid

Using condition editor check the payload content and see you get invalid data as you expect, if so dont choose receiver... stop the message using the option given in the receiver determination.

venkatasasidhargupta_gada
Active Participant
0 Kudos

Hi,

For your requirement, you can create local rules in standard case to allow the message if it contains atleast one valid record.

like EmployeeData\Record\Unit = AA OR EmployeeData\Record\Unit = DD or .. all valid values

in other way

EmployeeData\Record\Unit != BB OR EmployeeData\Record\Unit != CC if you have more valid values

You can choose suitable option for further processing of invalid message that is you can ignore/display as Error/ forward.

In message mapping, you can map only valid records to target structure by maintaing some simple if else conditions.

If the message does not contain atleast one valid unit, then receiver will not be determined.

Former Member
0 Kudos

Hi,

This is not possible with either standard or extended receiver determination.

In receiver determination, you can only determine the receivers based on the payload, you can not alter the payload in any way here.

This has to be taken care of in the mapping.

Regards