Skip to Content
avatar image
Former Member

X path Conditon

Hi All,

I need to put X path condition to determine the Receiver. My sample input XML payload

<Root>

<Segment1>

<Field1>

<Field2>

</Segment1>

<Segment2>

<Field1>

<Field2>

</Segment2>

<Segment3>

<Field1>

<Field2>

</Segment3>

<Test>

<Field1>

<Field2>

</Test>

<Root>

Above structure is formed after FCC. If the segment <Test> is present then i need to process the message to Receiver1. For this X path will be /Root/Test EX.

If the segment <Test> is not there in payload then i need to process the message to Receiver2. How to put X path condition for this.

Also other segments may or may not come in some files.

Regards

Prakash

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Mar 10, 2008 at 09:26 AM

    Hi,

    This can be achieved by using X-paths in rec determination

    Check these for Enhanced Rec Determination using X-paths

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

    Receiver Det- Xpath:

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

    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

    XPATH in Interfce Det:

    /people/suraj.sr/blog/2006/01/05/multiple-inbound-interfaces-within-a-service

    Regards

    Seshagiri

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Seshagiri,

      I already saw those blogs, but i need to put condition on Node level, to check if the node existing then we will put "EX". How to put condition for Not Existing.( Opposite of first condition)

      Suggest some more solution.

      Regards

      Prakash

  • avatar image
    Former Member
    Mar 10, 2008 at 09:44 AM

    Hi,

    why dont you use one more intermediate mapping whose message structure will be identical to that of yours now, just with an added extra field like:

    <Test>

    <Field1>

    <Field2>

    <presense>1</presense>

    </Test>

    the logic for <presense> is: use "exists" function available in Node functions category in graphical mapping

    then you can use this value in ur Xpath

    just give it a try

    Ranjit

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 10, 2008 at 09:48 AM

    Message Mapping

    Test ->exist()-> ifwithoutelse()-->Test (Constant 1)

    In Receiver Determination

    In Condition Editor Op RightOperand

    /p1:Root/Test = 1

    Configured Receivers

    Condition Party Service

    (/p1:Root/Test=1) Receiver1

    Add comment
    10|10000 characters needed characters exceeded