cancel
Showing results for 
Search instead for 
Did you mean: 

condition in Receiver Determination

Former Member
0 Kudos

Hi Everybody,

I have to set an xpath condition in the Receiver Determination where i have to check if the Name nodes filed First Name starts with Demo, then need to forward to the a receiver.

<Empid>

<Name>

<FirstName>demo</FirstName>

<LastName>test</LastName>

</Name>

<Empid>

I have used the xpath as:

/p1:Empid[count(Name[FirstName = "Demo"])>0]/FirstName EX

with reference to the link ,

But when i tested the configuration in ID...

Its not providing the expected result...

Im getting error as number of Name field matching Demo itself is counted wrong hence the whole output is wrong.

can some one please help me with this.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I think syntax is as follows ... Try this...

/p1:EmpId/Name/FirstName[starts-with(.,"demo")]

former_member189558
Contributor
0 Kudos

/p1:Empid[count(NameFirstName = \"Demo\"])>0/FirstName EX

Looks like First name (or its parent) can repeat, and you want to ensure that if at least one of those = Demo you want to send it to the receiver.

For that, just do the comparison for which First Name = "Demo" and keep the multiline option selected.

Thanks,

Himadri

Former Member
0 Kudos

Hi,

I have doubt regarding the multiline option,

If for example i have

<Empid>

<Name>

<FirstName>demo</FirstName>

<LastName>test</LastName>

</Name>

</Empid>

<Empid>

<Name>

<FirstName>Test</FirstName>

<LastName>test</LastName>

</Name>

<Empid>

<Empid>

<Name>

<FirstName>demo 2</FirstName>

<LastName>test</LastName>

</Name>

</Empid>

Now will it send the file with demo and demo2 data to Receiver1 at astretch and Test to Receiver2

or will send Demo node to Receiver 1 then Test node to Receiver 2 and again demo2 to Receiver1.

Please tell me how the procesisng is going to happen because i my case based on the condition I'm passing to proxy so I cant call proxy fro every node...

Former Member
0 Kudos

Hi,

The entire message including demo, test & Demo2 will be sent to Receiver1 & Receiver2.

-Supriya.

Former Member
0 Kudos

Hi,

I want the message demo and demo2 to be sent in one shot to Receiver1 and Test to Receiver 2.

How can we set the condtioneditor for this..

Thanks

Former Member
0 Kudos

Hi

The entire File is considered as message not a single record.

So in ur case both the conditions are satisfied in a file or message so it will be sent to both

Regards

sandeep