cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with the condition for a switch in our IntegrationProcess

Former Member
0 Kudos

Hi,

we're relatively new in using the XI-IntegrationBuilder and we have a small problem.

We try to define a switch-condition to perform two different Transformations depending on a specific value of a message element.

The condition looks like this:

(IncomingRequest./p1:MT_XI_REQUEST/status = donormal)

Both 'sides' of the condition are of the type (xsd:string).

But it seems the condition is not working in the right way.

It always uses the Transformation 'merge' (pls see image of IntegrationProcess->here the Transformation is shown as 'me').

<a href="http://www.edwebservice.de/uploads/a1a956a10f.jpg">Image of sampleprocess</a> (this is only a testprocess to show what we want to do)

For testing we already run the process without the switch (making it linear), by using each transformation occurring in the switch on its own. Both tests worked well and returned the expected different values. But as mentioned above when we're using both Transformations in the switch, always the Transformation 'merge' is performed.

It does NOT matter if the Transformation 'merge' is placed in the 'if' or in the 'otherwise' branch. It does NOT matter what value (true/false) the condition should return.

Maybe its a basic desing-problem of our process?

<b>Any suggestions will be appreciated</b>

Regards!

Georg

Our systemenvironment:

Runtime

Java version:1.5.0_01

Java vendor:Sun Microsystems Inc.

Version

Service pack:15

Release:NW04_15_REL

Latest change:15767

Sync time:200603080654

ps: we already checked the OSS note 890760 for resolution. but this didn't solve the problem.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Georg,

I see some possible reasons for that:

1.) Is the definition of the namespace alias p1 correct - in the condition editor you have your namespace aliases at the bottom - check whether p1 maps to the namespace of the message that you want to use in the condition.

2.) Is status an element or an attribute in your XML? If it's an attribute, the correct XPath is /@status

3.) Is the value match correct (blanks, ...)

Also you have a JRE 1.5 installed - I don't know how good XI works with Java 1.5 already?

regards,

Peter

Former Member
0 Kudos

Hi!

@Peter:

1) the namspaces are the same. we ckecked it already.

2) status is an element NOT an attribute

3) it is the same value (no blanks etc.)

we will try to run XI with 1.4.2

@Udo:

We know how to use XPath a litte bit and were to customize an expression in the conditioneditor. We only thought that you could mean a 'special functionality' of XI

Thanks for your ideas so far!

Regards!

Georg

udo_martens
Active Contributor
0 Kudos

Hi Georg,

use a OWN x-path expression like

 //status = donormal  

If you click the x-path expression from source interface, there is sometimes a problem with the namespace.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

what do you mean with: 'OWN x-path expression'?

Define a ContextObject and store the value of 'status' in it?

Not sure what exactly you mean. But we already tried to use ContextObjects.

We also checked the namespaces. But there seems to be no error.

Thanks for the suggestion!

Regards,

Georg

Message was edited by: Georg Schönberger

udo_martens
Active Contributor
0 Kudos

Hi Schorsch,

i mean an own expression, which you put in the field "XPath Expression" at window "Expression Editor". I gave you an example with double slash, which is finding first element "status" undependend from namespace. If you dont have more than one element "status" in your message, it will work fine.

Alternativly you must send right prefix and customize it in field downunder - better learn easy XPath: a good value 4 successful work

Regards,

Udo