cancel
Showing results for 
Search instead for 
Did you mean: 

XPATH Expression in ICO for Exists

sherin_jose4
Participant
0 Kudos

Hi,

Currently i am routing messages in an ICO for two different interfaces from a single source. This condition is at the Receiver Interface level as both belong to the same Business System.

The structure goes by this,

MT_BatchProcess

       BatchProcess

            LineType1

            LineType2

            LineType3

            LineType4

Condition: If LineType2 exists, then run the interface for ReceiverInterface 1

                If LineType3 and LineType4 exists, then run the interface for ReceiverInterface 2

XPATH Expression:  Type: String              Multiline: Checked

/MT_BatchProcess/BatchProcess[count(LineType2 >0 ]  EX      ----> ReceiverInterface 1

/MT_BatchProcess/BatchProcess[count(LineType3 >0 ]  AND /MT_BatchProcess/BatchProcess[count(LineType4 >0 ] EX   ----> ReceiverInterface 2

Somehow, this condition is not working in my case. Could someone help me find out what is that i am missing in these conditions.

Many thanks,

Sherin Jose

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Sherin,

Did you tried with standard expression like below

MT_BatchProcess/BatchProcess/LineType2 EX  AND MT_BatchProcess/BatchProcess/LineType3 EX

MT_BatchProcess/BatchProcess/LineType4 EX


regards,

Harish

sherin_jose4
Participant
0 Kudos

Hi Harish,

I tried this, but did not work.

Still got the Interface Determination error.

former_member184720
Active Contributor
0 Kudos

seems like you forgot to close the open "("

/MT_BatchProcess/BatchProcess[count(LineType2) >0 ]  EX      ----> ReceiverInterface 1

/MT_BatchProcess/BatchProcess[count(LineType3) >0 ]  AND /MT_BatchProcess/BatchProcess[count(LineType4) >0 ] EX   ----> ReceiverInterface 2

sherin_jose4
Participant
0 Kudos

Hi Hareesh,

This was just a copy paste error in the post.

I had that closed bracket covered in the conditions. Still getting the Interface Determination did not yield any interface error.

Former Member
0 Kudos

Make sure you have included the correct namespace prefix and just try with simple EX condition to see xpath expression is working.

sherin_jose4
Participant
0 Kudos

Hi Ramkumar,

I did try the same condition in a normal Receiver Determination and it worked perfectly fine without any issues.

I am facing this issue only when i apply it in an ICO.

former_member184720
Active Contributor
0 Kudos

If there is no typo then i don't think it's an issue with your xpath condition.

Check for Nicolas Freyre reply in the below thread. It should address your issue.

Error: InterfaceDetermination did not yield any actual interface in Advanced Adapter Engine

sherin_jose4
Participant
0 Kudos

Hi Hareesh,

Tried all the below 3 options but it didn't work.

1) Mine has a proper interface, so dummy interface not required in my case

2) The interface pattern is already setup as Stateless.

3) Removed the Sender component details and tried testing, still didn't work.

Removed all conditions and checked if atleast the flow is working fine and it worked and data was sent to both the interfaces. So, i feel it is something to do with the condition which is causing this issue.

Former Member
0 Kudos

Hello,

>>So, i feel it is something to do with the condition which is causing this issue.

How exactly ur interface is behaving when u have below condition in ID ?

Secondly, LineType** is a field or a node? and what's the occ of the same?

/MT_BatchProcess/BatchProcess[count(LineType2) >0 ]  EX      ----> ReceiverInterface 1

/MT_BatchProcess/BatchProcess[count(LineType3) >0  AND count(LineType4) >0 ] EX   ----> ReceiverInterface 2

Thanks

Amit Srivastava

sherin_jose4
Participant
0 Kudos

Hi Amit,

LineType is a Node with 0..Unbounded occurrence.

When i tried with the above condition, i'm getting RoutingException: Interface Determination did not yield any actual interface.

Former Member
0 Kudos

Hello,

There is a small correction in the XPath which i have mentioned above...So instead of using "AND" in uppercase use it in lowercase.

/MT_BatchProcess/BatchProcess[count(LineType2) >0 ]  EX      ----> ReceiverInterface 1

/MT_BatchProcess/BatchProcess[count(LineType3) >0  and count(LineType4) >0 ] EX   ----> ReceiverInterface 2

Thanks

Amit Srivastava

JaySchwendemann
Active Contributor
0 Kudos

Hi Sherin,

taking a long shot here but I had once a similar problem when condition editor in NWDS did not accept predicates (other limitations also applied). I thought that that was a limitation of NWDS' conditon editor but since an iFlow seems to be an ICO under the hood, maybe that limitation is in fact that of the ICO?

Not sure however, if this applies to you. My solution was to use condition editors "expression with white space" feature. Maybe this could be of some help

Cheers

Jens

sherin_jose4
Participant
0 Kudos

Hi Amit,

Still it did not work.

The test data that currently i am testing has only LineType 2.

former_member184720
Active Contributor
0 Kudos

2) The interface pattern is already setup as Stateless.

>>>It should be stateless (XI 3.0 compatible)

3) Removed the Sender component details and tried testing, still didn't work.

>>> Did you remove the software component version? You just need to leave it blank under inbound processing tab?

sherin_jose4
Participant
0 Kudos

Hi Hareesh,

I did exactly as you said and it did not work.

I believe the issue might be with the condition logic itself as i can see the message getting routed to receiver 1 when i remove the condition for receiver 2.

former_member184720
Active Contributor
0 Kudos

Hmm.. did you test the second condition alone? i don't see anything wrong with xpath condition and you mentioned that the same condition works fine if you do that in receiver determination?

However are you deploying it through an iflow i.e. NWDS?

Former Member
0 Kudos

Hello,

I have tested ur condition and it's working fine, do u mind sharing ur ID conditions screenshot

Thanks

Amit Srivastava

sherin_jose4
Participant
0 Kudos

Hi Hareesh,

I am not using iFlow for this condition.

Currently using ICO in PI 7.3

former_member184720
Active Contributor
0 Kudos

By any chance did you remove the namespace prefix?

Can you share screenshot?

sherin_jose4
Participant
0 Kudos

Hi Hareesh,

Please find the screenshot below,

Former Member
0 Kudos

Namespace prefix is missing in ur conditions?

Ur xpath should start like this

/p1:MT***

Check the screenshot which i have pasted above and correct ur condition

sherin_jose4
Participant
0 Kudos

Hi Amit,

Thanks a lot and it worked perfectly fine !!!

That prefix was the missing part, so silly it didn't strike to me. Got a bit carried away as it worked fine when i gave only one condition without prefix.

Answers (0)