Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 06, 2010 at 11:34 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2010 at 11:20 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2010 at 11:28 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2010 at 11:47 AM

    use the exists function in the XPATH

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

    Add comment
    10|10000 characters needed characters exceeded