cancel
Showing results for 
Search instead for 
Did you mean: 

using "string-length" in STANDARD receiver determ xpath rule in PI 7.11

Former Member
0 Kudos

Hi

I have a situation, where I need to call one system, if the businesspartner value is 6 characters long and call an other system, if the length is different from 6 characters.

I am trying to use the standard receiver determination by entering this rule, but it does not work:

(string-length(/p1:ValidateUserRequest/Businesspartner)) = 6 -> system1

(string-length(/p1:ValidateUserRequest/Businesspartner)) not= 6 -> system2

Is there no way of sprucing up the standard xpath expression in the way I try?

What alternatives do I have?

Mikael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

string-length is normally supported in receiver determination condition editor ! what does not work : syntax or routing ?

This works :

/p1:ValidateUserRequest\[string-length(Businesspartner)=6\] EX => system1

/p1:ValidateUserRequest\[string-length(Businesspartner)!=6\] EX => system2

Chris

Edited by: Christophe PFERTZEL on Jan 6, 2010 12:36 PM

Former Member
0 Kudos

This did the trick thanks a lot guys!

Answers (3)

Answers (3)

Shabarish_Nair
Active Contributor
0 Kudos

use the exists function in the XPATH

Ref: /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

lnirmala
Participant
0 Kudos

Hi,

Please try giving the XPath expression as given below:

/p1:ValidateUserRequest [string-length(Businesspartner) = 6] system1

/p1:ValidateUserRequest [string-length(Businesspartner) != 6] system 2

Please use square brackets before "string" and after "6"...its not getting displayed in my reply...:-(

Rgds,

Lekshmi.

Edited by: Lekshmi N on Jan 6, 2010 12:29 PM

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Try to use Enhaanced Receiver Determination,there you can check the string length,for that write simple UDF.

based on value you can call service.

Regards,

Raj