ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: BPEL - array manipulation
Date Thu, 13 Sep 2007 14:21:59 GMT
We also have an example as part of the test framework. It's kind of trivial
but you can increment from it easily I think.

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

Cheers,
Matthieu

On 9/13/07, Tammo van Lessen <tvanlessen@gmail.com> wrote:
>
> Hi,
>
> there is small example in the BPEL 2.0 specification [1] on page 65.
>
> HTH,
>   Tammo
>
> [1] http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.pdf
>
> 2007/9/12, Anup Chandran <anup.chandran@3ds.com>:
> >
> > Hi Matthieu,
> >
> > Can you point me to some doc on bpws:doXslTransform
> >
> > I'm trying to assign individual elements of an array in a complex type.
> >
> > An example will be really helpful.....
> >
> > Cheers
> > Anup
> >
> >
> >
> >
> >
> > Matthieu Riou-2 wrote:
> > >
> > > Hi Anne,
> > >
> > > To assign arrays you should copy their root element instead of each
> > > element
> > > individually. So you would use some sort of container element and
> assign
> > > it
> > > as a whole.
> > >
> > > Now if you really need to copy each of these elements one by one, you
> will
> > > have to rely on XSL. And that's actually a much better alternative for
> > > complex data structures manipulations. So you should use the
> > > bpws:doXslTransform BPEL function and use simple XSL stylesheets.
> > >
> > > Cheers,
> > > Matthieu
> > >
> > > On 2/9/07, Anne Noseda <noseda.anne@gmail.com> wrote:
> > >>
> > >>
> > >> Hi,
> > >>
> > >> I would like to manipulate array dynamically in my BPEL process.
> > >> I have tryed the following syntax : I have a while loop and a
> variable
> > >> counter initialized to 1 and incremented at each loop. In this loop,
> I
> > >> make
> > >> the following assignment :
> > >>
> > >> <bpws:copy>
> > >> <bpws:from
> > >> xmlns:etnic="http://services.etnic.be
> > >> ">$responseEtab.parameters</bpws:from>
> > >> <bpws:to
> > >> xmlns:etnic="http://services.etnic.be
> > >> ">$responsesEtab/items[$counter]</bpws:to>
> > >> </bpws:copy>
> > >>
> > >> At execution time, I receive this error :
> > >> FATAL - ASSIGN                         - Unexpected exception in
> > >> assignment,
> > >> terminating process
> > >> java.lang.IllegalStateException: LValue must not have more than one
> > >> variable
> > >> reference
> > >>         at
> > >> org.apache.ode.bpel.elang.xpath10.o.OXPath10Expression.getVariable(
> > >> OXPath10Expression.java:171)
> > >>         at
> > >> org.apache.ode.bpel.o.OAssign$LValueExpression.getVariable(
> OAssign.java
> > >> :117)
> > >>         at org.apache.ode.bpel.runtime.ASSIGN.evalLValue(ASSIGN.java
> :112)
> > >>         at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:357)
> > >>         at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:78)
> > >>         at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown
> Source)
> > >>         at
> > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> DelegatingMethodAccessorImpl.java
> > >> :25)
> > >>         at java.lang.reflect.Method.invoke(Method.java:585)
> > >>         at
> > >> org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java
> :451)
> > >>         at org.apache.ode.jacob.vpu.JacobVPU.execute (JacobVPU.java
> :139)
> > >>         at
> > >> org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(
> > >> BpelRuntimeContextImpl.java:731)
> > >>         at
> > >> org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(
> BpelProcess.java
> > >> :703)
> > >>         at
> > >> org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> > >> BpelEngineImpl.java:267)
> > >>         at
> > >> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute
> > >> (QuartzSchedulerImpl.java:295)
> > >>         at
> > >> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > >> QuartzSchedulerImpl.java:301)
> > >>         at
> > >> org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(JobImpl.java:32)
> > >>         at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
> > >>         at
> > >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > >> ThreadPoolExecutor.java
> > >> :650)
> > >>         at
> > >> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java
> > >> :675)
> > >>         at java.lang.Thread.run(Thread.java:595)
> > >>
> > >> So, my question, how to manipulate dynamically arrays without having
> two
> > >> variables in the left expression of the assignment ?
> > >>
> > >> And my second question more "philosophical" : is this the good way ?
> Is a
> > >> BPEL process able to manipulate arrays or must I invoke external
> partners
> > >> for all "complex" manipulations ? Or is there an other way to handle
> my
> > >> problem ? With xsl or other things ?
> > >> I think that BPEL code becomes to much complex when the process logic
> > >> involves a lot of variables' manipulations.
> > >>
> > >> Thanks in advance,
> > >>
> > >> Anne.
> > >> --
> > >> View this message in context:
> > >>
> http://www.nabble.com/BPEL---array-manipulation-tf3198998.html#a8881712
> > >> Sent from the Apache Ode User mailing list archive at Nabble.com.
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> http://www.nabble.com/BPEL---array-manipulation-tf3198998.html#a12644149
> > Sent from the Apache Ode User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> Tammo van Lessen - tvanlessen@gmail.com - http://www.taval.de
>

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