ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: Facing problem with condition evaluation on RHS in an assignment statement while using ODE.
Date Thu, 17 Jul 2008 14:21:12 GMT
On Thu, Jul 17, 2008 at 5:41 AM, Rosalin Pattnaik <
rosalin.pattnaik@gmail.com> wrote:

> Hi,
>
>
> I tried to assign
>
> concat(" Name:
> ",$outGetEntityDetails.parameters/tns:entityDetail[@key='Name']/text())
>
> to
>
> $output.payload/tns:validator[$counter]
>
> This gives me the following exception <faultcode>soapenv:selectionFailure</
> faultcode>
>   <faultstring>{
> http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure<http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure>
> <
> http://docs.oasis-open.org/wsbpel/2.0/process/executable%7DselectionFailure
> >Multiple
> results for expression: {OXPath10Expression
> $output.payload/tns:validator[$counter]}</faultstring>
>
>
> While i am able to assign to
>
> $output.payload/tns:validator[1]/$output.payload/tns:validator[2]/$output.payload/tns:validator[3].It
> is so that an condition in an Xpath is not evaluated on RHS of an
> assignment?
>

I'm guessing you're using XPath 1.0 in your process. Can you try with XPath
2.0 and see how it works? You just have to define the queryLanguage and
expressionLanguage attributes in the process root element like this:

http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/distro/src/examples-war/HelloWorld2/HelloWorld2.bpel


>
> How can i assign to each user element while the schema is something like
> this..
>
> <element name="sample">
>                <complexType>
>                    <sequence>
>                        <element name="user" type="string" minOccurs="0"
> maxOccurs="unbounded"/>
>                    </sequence>
>                </complexType>
>            </element>
>
>
If you know how many user elements should be assigned to when writing your
process, it's doable. You have to first initialize the variable you're
assigning to with the right number of elements and then set their content in
a loop. If you don't, assignment can't do that (I know, it's a silly spec
limitation). You'll have to rely on XSL. Have a look at the doXslTransform
XPath function, we have an test illustrating its usage here:

http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestXslTransform/

Thanks,
Matthieu


>
>
> Regards,
> Rosalin
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message