Hi Anne, So first you don't need to specify the namespace for the function. And it even seems that specifying it leads to an incorrect result, which is probably a bug. But for now just don't give any namespace for your functions and that should work.
The second problem is that our implementation of the <if> activity doesn't yet reflect the changes in the latest WS-BPEL draft so you'll need to write: <if> <condition>...</condition> <then>...</then> <else>...</else> </if> I've created an issue to track this here: http://issues.apache.org/jira/browse/ODE-95. Add yourself as a watcher to be notified when this is corrected (hopefully shortly). Matthieu On 2/4/07, Anne Noseda <[EMAIL PROTECTED]> wrote:
Hi, I would like to test the if activity but I have strange results. If I write a BPEL process as follow (I run it into Servicemix) : <variable name="errorMsg" type="xsd:string"/> <assign name="test"> <copy> <from> <literal>Toto</literal> </from> <to>$errorMsg</to> </copy> </assign> <if name="coherencePrecision"> <condition>fn:true()</condition> <sequence> <assign name="assignPrecision"> <copy> <from> <literal>Titi</literal> </from> <to>$errorMsg</to> </copy> </assign> </sequence> <else> <assign> <copy> <from> <literal>Tata</literal> </from> <to>$errorMsg</to> </copy> </assign> </else> </if> I get as result "Tata" ! So the condition fn:true() does not work ! My first question : must I prefix the xpath functions with xmlns:fn="http://www.w3.org/2005/xpath-functions" ? I also test these conditions with also strange results : <condition>true()</condition> result : Tata <condition>true</condition> result : Toto <condition>fn:false()</condition> result : Toto <condition>1 = 1</condition> result : Tata So when I write <condition>true</condition> I get result : Toto : the BPEL process does not execute the if activity and does not execute the else activity !!! How is it possible ??? Thanks in advance, Anne. -- View this message in context: http://www.nabble.com/BPEL---How-work-%3Cif%3E-activity---tf3172971.html#a8802271 Sent from the Apache Ode User mailing list archive at Nabble.com.