cancel
Showing results for 
Search instead for 
Did you mean: 

XPATH Condition receiver determination in PI 7.31

Former Member
0 Kudos

Hi Experts,

I am using the below expression in RECIVER PI 7.31singlestack

/p1:VDA490500/S512/ABCDE ≠ 155  OR /p1:VDA490500/S512/ ABCDE ≠ 37  OR /p1:VDA490500/S512/ ABCDE ≠ 60  OR /p1:VDA490500/S512/ ABCDE ≠ 060  OR /p1:VDA490500/S512/ ABCDE ≠ 117  OR /p1:VDA490500/S512/ ABCDE ≠ 006  OR /p1:VDA490500/S512/ ABCDE ≠ 28  OR /p1:VDA490500/S512/ ABCDE ≠ 371  OR /p1:VDA490500/S512/ ABCDE ≠ 100

Requirement is anything other than 155,28,37,060,60,371 we have to send to target.But it is not happening with above condition.

When I checked 371 is went successfully processed supposed to not to go the receiver.

What condition do I need to use restrict above values  in the XPATH message.

/p1:VDA490500[(S512/ABCDE = "155" or S512/ ABCDE= "37" or S512/ABCDE = "60" or S512/ ABCDE ="060" or  S512/ABCDE ="006" or S512/ABCDE = "28" or S512/ABCDE = "371")]

Or

(/S512[(ABCDE != '1'and ABCDE != '2' and ABCDE != '3')]) EX

Above expressions are correct as per my requirement.

Field are capitals only in the input payload.

Thanks

Prem

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Prem,


/p1:VDA490500/S512/ABCDE ≠ 155  OR /p1:VDA490500/S512/ ABCDE ≠ 37  OR /p1:VDA490500/S512/ ABCDE ≠ 60  OR /p1:VDA490500/S512/ ABCDE ≠ 060  OR /p1:VDA490500/S512/ ABCDE ≠ 117  OR /p1:VDA490500/S512/ ABCDE ≠ 006  OR /p1:VDA490500/S512/ ABCDE ≠ 28  OR /p1:VDA490500/S512/ ABCDE ≠ 371  OR /p1:VDA490500/S512/ ABCDE ≠ 100

The above expression you need to use AND operator instead of OR operator which means like below.


/p1:VDA490500/S512/ABCDE ≠ 155  AND /p1:VDA490500/S512/ ABCDE ≠ 37  AND  /p1:VDA490500/S512/ ABCDE ≠ 60  AND /p1:VDA490500/S512/ ABCDE ≠ 060  AND /p1:VDA490500/S512/ ABCDE ≠ 117  AND /p1:VDA490500/S512/ ABCDE ≠ 006  AND /p1:VDA490500/S512/ ABCDE ≠ 28  AND /p1:VDA490500/S512/ ABCDE ≠ 371  AND /p1:VDA490500/S512/ ABCDE ≠ 100

Regards,

Praveen.

Former Member
0 Kudos

HI Both

Requirement is anything other than 155,28,37,060,60,371 we have to send to rest of other to target.

/p1:VDA490500/S512[(ABCDE = "155") or (ABCDE= "37") or (ABCDE = "60") or (ABCDE ="060") or  (ABCDE ="006") or (ABCDE = "28") or (ABCDE = "371")] EX

or

/p1:VDA490500/S512/ABCDE ≠ 155  AND /p1:VDA490500/S512/ ABCDE ≠ 37  AND  /p1:VDA490500/S512/ ABCDE ≠ 60  AND /p1:VDA490500/S512/ ABCDE ≠ 060  AND /p1:VDA490500/S512/ ABCDE ≠ 117  AND /p1:VDA490500/S512/ ABCDE ≠ 006  AND /p1:VDA490500/S512/ ABCDE ≠ 28  AND /p1:VDA490500/S512/ ABCDE ≠ 371  AND /p1:VDA490500/S512/ ABCDE ≠ 100

which one I need to use.

could you please suggest me.

Thanks

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Prem,

I am readjusting because I thought you are using or. Anyway, here is what it should look like

/p1:VDA490500/S512[(ABCDE != "155") and (ABCDE != "37") and (ABCDE != "60") and (ABCDE !="060") and (ABCDE !="006") and (ABCDE != "28") and(ABCDE != "371")] EX

Why don't you try it out.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for your support.It is working but I have added 2 more conditions.

below expression is correct one?

/p1:VDA490500/S512[(WKKND != "155") and (WKKND != "37") and (WKKND != "60")and (WKKND !="060") and (WKKND !="006") and (WKKND != "65") and (WKKND != "THO") and (WKKND != "28")
and (WKKND != "371")] EX

could you please confirm.

Thanks

prem

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Prem,

It looks similar, so yes, it should be syntactically correct.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

I have seen some difference in condition(WKKND !="006")-->here space is needed after =.

could you please confirm.

Thanks

Prem

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Prem,

With our without space it will work, but of course if you are OC you will put a space. Nothing wrong with that,

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

thanks for your support.

I have below requirement.

one condition should be like this /p1:VDA490500/S512[(ABCDE = "155")and another
condition /p1:VDA490500/S512[(GHIJK != "155")-->but in this condition we are getting spaces.

could help me how to write in this case.

Requirement is we have same INTERFACE is sending the
data for 2 different customers but we need to send ABCDE =155 AND we don’t wont to send for field EFGHI != 200,But when check the  xml data for this one we aregetting spaces after 200.interface is same we are getting 2 different messages.

Could you please provide correct x path condition.

Thanks

Prem

Former Member
0 Kudos

Hi Mark,

thanks for your support.

I have below requirement

one condition should be like this /p1:VDA490500/S512[(ABCDE = "155")and another condition /p1:VDA490500/S512[(GHIJK != "155")-->but in this condition we are getting spaces.

Could help me how to write in this case.

Requirement is we have same INTERFACE is sending the data for 2 different customers but we need to send ABCDE =155 AND we don’t wont to send for field EFGHI != 200,But when check the  xml data for this one we are getting spaces after 200. we are getting like below In the xml.<EFGHI>123456  </ EFGHI >interface is same we are getting 2different messages.

Could you please provide correct x path condition.

Thanks

Prem

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Prem,

Can you try the contains function?

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

could you please give me the correct syntax for my requirement.

I am not able understand that syntax.

Thanks

Prem

Former Member
0 Kudos

Hi Mark,

p1:VDA490500/S512[(ABCDE != "155") and (EFGHI ="200") but in second one we are getting 3 spaces after 200 value.how
to write in this case.

is above syntax is correct?

former_member182412
Active Contributor
0 Kudos

Hi Prem,

You can use below XPATH:


p1:VDA490500/S512[ABCDE != "155" and normalize-space(EFGHI) ="200"]

Regards,

Praveen.

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Prem,

You can still simplify your expression, try using this, remember to check multiline and set no receiver found behavior to stop processing instead of throwing error:

/p1:VDA490500/S512[(ABCDE = "155") or (ABCDE= "37") or (ABCDE = "60") or (ABCDE ="060") or  (ABCDE ="006") or (ABCDE = "28") or (ABCDE = "371")] EX


Regards,

Mark


Former Member
0 Kudos

Hi Mark,

thanks for your information

'Multiline is default checked.

set no receiver found behaviour to stop processing instead of throwing error: I didn't understand.

need select XPATH and then opposite space we need to paste the whole above condition?

Thanks


markangelo_dihiansan
Active Contributor
0 Kudos

Hi Prem,

You need to select EX as the operator and then you can paste the condition.

Regards,

Mark

former_member182412
Active Contributor
0 Kudos

Hi Prem,

Check these blogs for more information

Xpath Condition in Receiver Determination - Process Integration - SCN Wiki

Regards,

Praveen.

markangelo_dihiansan
Active Contributor
0 Kudos

Sorry about that, it should be != instead of =