cancel
Showing results for 
Search instead for 
Did you mean: 

Xpath Condition in Interface Determination

sntamilselvan
Explorer
0 Kudos

Hi Experts,

Need your inputs on X-Path condition in Interface determination.

I need to route XML message based on a field NAME (E.g.)

For e.g. :-  Condition1 - if the NAME field is abc* ,it should go to 1st receiver. (* - any string including "d" also)

                 Condition2 if the NAME field is abcd* ,it should go to 2nd receiver.

  The issue raises when the scenario " abcdo " should go to 1st receiver not to 2nd receiver but, at that time the condition 1 is conflicting with condition 2 . Is there any way to filter "abcdo" from "abcd* ". i want "abcdo" alone to go to 1st receiver and other than that all abcd* should go to 2nd receiver. I have already used SUBSTRING Function but it dint help me. Pls guide me.

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi ,

                                Please try putting the condition like this

condition1: If (Name field is equal to "abcdo") OR ((Name Field is not equal to "abcd*) AND (Name Field is equal to "abc*))  ---- first receiver

Condition2: if(Name field is not equal to "abcdo") AND (Name Field is equal to "abcd*")--second receiver

If you use above two conditions then no message with field value "abcd*" flows to first receiver.

This stops contradiction. Now if you want to send messages with value "abcd*" also to the first receiver along with second one then try adding the third condition as shown below

Condition3: if Name field is equal to "abcd*" send to first receiver.

Regards

Anupam

sntamilselvan
Explorer
0 Kudos

Hi Anup,

I think above conditions will work on different service interfaces but my scenario having same service interface for different OM. Also, i want to add a point here that the receivers are differentiated only by user name and password (having Different message mapping and respective Operation mapping) . Messages will get split and routed when it reaches the same Target URL , they will log in Third-party system using respective username and password.So,that the message will get updated in respective receiver. i hope that you got the complete scenario.

When i use above condition or any conflicting or related to other condition, In test configuration , PI will throw an error as

   Error when determining the inbound interface: Inbound interface found several times (for same sender and receiver) for the outbound interface
peter_wallner2
Active Contributor
0 Kudos

Hello,

you have to add a condition to your XPATH I think, something like this maybe:

NAME[not(.='abcdo')]='abcd*'

for the 2nd receiver. This would send all "abcd*" to second receiver but NOT "abcdo".

1st receiver should not be a problem I think:

NAME='abcd*'

Best regards,

Peter

Answers (2)

Answers (2)

praveen_sutra
Active Contributor
0 Kudos

Hi Selvan,

Could you please try below mentioned conditions:

Condition1 - if the NAME field is abc* OR  Name is equal to abcd

Condition2- if NAME is not equal to abcdo AND name is equal to abcd*

thanks and regards,

Praveen T

sntamilselvan
Explorer
0 Kudos

Hi Praveen,

The conditions are getting related and PI throwing the same error as ,

   Error when determining the inbound interface: Inbound interface found several times (for same sender and receiver) for the outbound interface
Former Member
0 Kudos

Hi

your above statements are contradicting to each other , however did you try the "not equal to"option in your conditions?.with that you can set the exclusion rule to allow the rest to go to the other condition

Kind Regards

Vishnu