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 <[EMAIL PROTECTED]> 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.
