Skip to Content
0
Sep 12, 2007 at 12:08 PM

** XPath condition not work well in Receiver Determination.

286 Views

Hi,

My scenario is having 3 receivers. I have 'Student' is the data type. I use the same data type for Source & Target Message Types. Requirement is I have to send

1) only records which are having SCOURSE = 'BE' to receiver 1

2) only records which are having SCOURSE = 'MCA' to receiver 2

3) only records which are having SCOURSE = 'MBA' to receiver 3

My Input.xml file contains the following records.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:THIRD_MT_OB xmlns:ns0="http://ganesh_third">

<STUDENT_INFO>

<ST_ID>10020</ST_ID>

<SNAME>Raja</SNAME>

<SCOURSE>BE</SCOURSE>

<SFEES>3000</SFEES>

<SMARKS>1200</SMARKS>

</STUDENT_INFO>

<STUDENT_INFO>

<ST_ID>10021</ST_ID>

<SNAME>Ram</SNAME>

<SCOURSE>MCA</SCOURSE>

<SFEES>3000</SFEES>

<SMARKS>1200</SMARKS>

</STUDENT_INFO>

<STUDENT_INFO>

<ST_ID>10022</ST_ID>

<SNAME>Ram</SNAME>

<SCOURSE>MBA</SCOURSE>

<SFEES>3000</SFEES>

<SMARKS>1200</SMARKS>

</STUDENT_INFO>

</ns0:THIRD_MT_OB>

I set the Xpath condition in the Receiver Determination Step and add the 3 receivers for against the conditions.

Our problem is, If we send the single record in the input file, the corresponding receiver is selected correctly and we get the output file for that receiver. But, if we send the all combination of records (MCA,BE,MBA) 3 receivers are selected and the 3 output files we get. But, the three files are having the all records (MCA,BE,MBA). Instead, we want the first file should only have MCA record, the 2nd file should only have BE record and finally the 3rd file should only have MBA record. That means each receiver should receive only one record for the above input.

Friends, I though it will work for the 'XPath Expression' against receivers in the Receiver Determination Step. But, it didn't work. (Records are not split up)

How do achieve this, friends?

Could you kindly help me to solve this problem.

Kind Regards,

Jeg P.