cancel
Showing results for 
Search instead for 
Did you mean: 

** XPath condition not work well in Receiver Determination.

jegathees_waran
Active Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Jegathees,

You need to use Enhanced Receiver determination in order to achieve the same. Please see the similar issue in the below forum

[Page 3]

raj.

Former Member
0 Kudos

Hi Raj and Babu,

My understanding of the question is that he wants to <b>split</b> the incoming msg content to multiple receivers.

Enhanced receiver determination will allow XI to figure out the receivers at runtime and the <b>entire</b> msg will be sent to the identified receivers and <b>not parts</b> of the message. Same is the case with Xpath in conditional receiver determination.

Please let me know if i am wrong.

Cheer's

justin_santhanam
Active Contributor
0 Kudos

Dreamcatcher,

Can u please look into the forum which I referred him and look out for my reply over ther. If I'm wrong then please correct me.

raj.

Former Member
0 Kudos

I am sorry Raj .. checked out the thread ...would like to add that you have put in a lot of effort to describe the alternative scenario in that thread.

Cheer's

justin_santhanam
Active Contributor
0 Kudos

Dreamcatcher,

Please don't be sorry for that :-). Thatz fine, I really appreciate your effort and work in forum.

raj.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

Just the same problem that I fixed yesterday!

Check my thread

You need to create 3 Message Mapping and the respective IM of coursee , then for each mapping program generate only the records (nodes) according to your codes (BE, MCA, MBA). You can do it easly with <b>equalsS</b> and <b>createIf</b> standard functions. Set each mapping for each receiver that you have...

I hope it helps,

Ricardo.

Former Member
0 Kudos

hi,

can you try like this

/p1:THIRD_MT_OB/SCOURSE[contains(.,'BE')] EX and no right operand

and similarly for other too.

Babu

Former Member
0 Kudos

If you are trying to split you input msg and send it to 3 different receivers using conditional receiver determination then it will not work. Once a condition is meet in the receiver determination then the entire msg is forwarded to the corresponding receiver, that is why when you have a single row in your input file which results in a single msg in XI the conditional receiver works. Now when you have multiple rows in your input file still only one msg is being created in XI for all the rows currently so all the conditions are being meet and the msg is forwarded to all the receivers.

If you are using FCC in the sender side then use the "recordset per msg" parameter to consider each row of your input file as a separate msg in XI and the rest will automatically fall in place.

Cheer's