ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosalin Pattnaik" <rosalin.pattn...@gmail.com>
Subject Re: Facing problem with condition evaluation on RHS in an assignment statement while using ODE.
Date Thu, 17 Jul 2008 16:19:49 GMT
Hi ,

I tried after adding
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"

to the <bpws:process> tag. But it yet didnt work.

the number of elements is decided dynamically while i run the flow.I am
using an XSL Transform to intilize  the variable.But even after its properly
initialized am not able to get the assign anything to it using a Conditional
expr on the RHS . while i am able to access
validator[1]/validator[2]/validator[3] [The present scenario that i am
testing it with returns three users]. But face the fore mentioned exception
while using validator[$counter]. I even cheched for the counter variable to
see whether it gets incremented properly.

Thanks,
Rosalin




On Thu, Jul 17, 2008 at 7:51 PM, Matthieu Riou <matthieu@offthelip.org>
wrote:

> 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
> >
> > <
> >
> 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