cancel
Showing results for 
Search instead for 
Did you mean: 

XPath

Former Member
0 Kudos

Hi,

In receiver determination i'd like to create conditional routing. Based on such rule if in elements <MEINH> exists GAB route to system SYS1 if in <MEINH> is VNT route to system SYS2. Is there a tricky syntax to achieve it?

Below is sample.

doc which should be routed to SYS1

<doc>

<meinh>KG</meinh>

<meinh>KG</meinh>

<meinh>VNT</meinh>

<meinh>KG</meinh>

<meinh>VNT</meinh>

<meinh>KG</meinh>

<meinh>KG</meinh>

</doc>

doc which should be routed to SYS2

<doc>

<meinh>KG</meinh>

<meinh>KG</meinh>

<meinh>KG</meinh>

<meinh>GAB</meinh>

<meinh>GAB</meinh>

<meinh>KG</meinh>

<meinh>GAB</meinh>

</doc>

Regards,

Wojciech

Accepted Solutions (0)

Answers (3)

Answers (3)

moorthy
Active Contributor
0 Kudos

HI,

As it you need to do as normal way with Condition option in the Recieevr Determination

This blog may help u-to find out syntax

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

Make sure that in the condition editor you choose "Multiline ....option " ( I think so)..

Regards,

Moorthy

Former Member
0 Kudos

Hi,

I've solved it using something like that:

/rfc:Z_CART_ARTTODCS/PT_ARTDATA/item[ZZMEINH="GAB"] EX => System1

/rfc:Z_CART_ARTTODCS/PT_ARTDATA/item[ZZMEINH="GAB"] EX => System2

Actually problem was with my sample XML. Thank you Krishna and Michal you have moved me into good track.

Regards,

Wojciech

MichalKrawczyk
Active Contributor
0 Kudos

hi,

no tricky syntax I believe

condition receiver loop through all values

and if it finds one then it will go to

the specified receiver

you can easily try it in ID in test configuration tab

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi Wojciech,

if you have a closer look in your receiver determination you will find a column: "condition".

Here you can define a payload depending condition like you need.

Regards Mario

Former Member
0 Kudos

Hi Michal,

I know that there is a condition editor. But as far as I'm concerned it picks first value. But I'm looking for these looping code in XPATH.

Regards,

Wojciech