Skip to Content
author's profile photo
Former Member

Receiver Determination

Hi,

We are running SAP PI 7.11.

Input message:

<?xml version="1.0" standalone="yes"?>

http://test.com/SITE_Error">

<ERROR_DATA>

<ERROR_DATE>20110120</ERROR_DATE>

<ERROR_TIME>060002</ERROR_TIME>

</ERROR_DATA>

<SITE_INFO>

<SITEID>AZAZ</SITEID>

</SITE_INFO>

<ERRORS>

<ERROR>Version 2.00</ERROR>

<ERROR>Bla Bla 1</ERROR>

<ERROR>Bla Bla 2</ERROR>

<ERROR>Bla Bla 3</ERROR>

</ERRORS>

</SITE_ERROR>

I require to route the message for delivery if a second node in XPATH /SITE_ERROR/ERRORS/ERROR occurs else it will not be delivered.

It seems that receiver determination with a condition in the form of a XPATH expression should solve this problem as I would be able to determine if there is a second "ERROR" node and if there is then route it for delivery. However when the rule is not satisfied then for "If No Receivers Is Found, Process as follows:" rule I set "ignore".

Please could you leant some assistance in constructing the XPATH expression? I have it down as:

(/SITE_ERROR/ERRORS/ERROR[(2)] EX )

Your assistance in this matter will be greatly valued.

Regards

Willie Hugo

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Apr 12, 2011 at 04:14 PM

    your Xpath condition seems fine as you have used EX in that it will check for existance of the field element and will route that interface to mentioed system..

    which is right.. but as you mentioed its not working I think there is possibility that its problem of cache ..

    just to rechcek..

    -- check Cache status..

    -- go to SXI_CACHE and check status for your receiver determination object..

    -- if everything is not green then try to activate receiver determination one more time.. just to be on safer side you can reactivate all ID side objects..

    then again check your scenario..

    this is about Xpath..and as you mentioed "If No Receivers Is Found" you have selected igonre then in this case it wll just ignore this message and will not show in SXMB_MONI also..

    here you can select alternate business system or for timebeing select same receiver system and check.. if it is working..

    it should work as your configuration looks fine..

    Thanks,

    Bhupesh

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Apr 12, 2011 at 02:02 PM

    I can't really comment on the xpath solution however what you can do is to create a mapping,

    RECEIVER_DETERMINATION with your source message and the Receivers interface (with

    all the PI standard mapping tools at your disposal), and use that mapping in your

    receiver determination step.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 04, 2011 at 08:52 AM

    The site "http://www.w3schools.com/xpath/xpath_syntax.asp" assisted in forming the XPATH expression.

    The XPATH expression and condition below, check for the existence of the second <ERROR> node in the message. If it exists then the receiver determination will be true and the message wil be sent.

    /SITE_ERROR/ERRORS/ERROR[2] EX

    Why the rule was not working initially was that I had a namespace in the test message that qualified the access to the <ERROR> node, but did not have it specified in the prefix - namespace pair. Once that was resolved the condition worked as expected.

    Add comment
    10|10000 characters needed characters exceeded