ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Rodríguez Pedrianes <jrod...@arte-consultores.com>
Subject RE: Unbounded elements problems
Date Thu, 16 Aug 2007 07:27:49 GMT

Thanks I will use xslTrasform  Thanks a lot
 
 
 
 
 
 
-----Mensaje original-----
De: Alex Boisvert [mailto:boisvert@intalio.com] 
Enviado el: miércoles, 15 de agosto de 2007 5:17
Para: user@ode.apache.org
Asunto: Re: Unbounded elements problems

(Been trying to send this all day... the mailing list was bouncing)

Hi Jorge,

Standard BPEL assignments (using XPath) do not have the capability to insert
data into a nested structure.  The structure must already exist in order to
select the target node in the <to> expression.

Your best bet is to use XSLT, which is recommended for any complex data
transformation in BPEL:

<bpel:assign>
    <bpel:from>bpel:doXslTransform("foo.xsl", $foo)</bpel:from>
    <bpel:to variable="foo" />
</bpel:assign>


You can see an example here
http://svn.apache.org/repos/asf/ode/trunk/bpel-test/src/test/resources/bpel/
2.0/TestXslTransform/

There's been discussion about extending the <copy> activity to support
insertion.  The current ideas/proposal can be found here:
http://cwiki.apache.org/confluence/display/ODExSITE/copy+with+insert+attribu
te


alex

On 8/14/07, Jorge Rodríguez Pedrianes <jrodped@arte-consultores.com> wrote:
>
> These days I'm trying to use ODE to manage unbounded elements. For
> example,
> I have a process that returns an array of items:
>
>
>
>                 <consultaReturn>
>
>                    <items>
>
>                         <item>
>
>                            <param1>value1</param1>
>
>                            <param2>value2</param2>
>
>                         </item>
>
>                         <item>
>
>                            <param1>value3</param1>
>
>                            <param2>value4</param2>
>
>                         </item>
>
>                    </items>
>
>                 </consultaReturn>
>
>
>
> When, in bpel, I try to build this, I can't do it.
>
>
>
> My bpel is:
>
>
>
>     <bpel:sequence>
>
>      <bpel:assign>
>
>         <bpel:copy>
>
>            <bpel:from>
>
>               <bpel:literal>1</bpel:literal>
>
>            </bpel:from>
>
>            <bpel:to>$numItems</bpel:to>
>
>         </bpel:copy>
>
>         <bpel:copy>
>
>            <bpel:from>
>
>               <bpel:literal>
>
>                                <consultaReturn>
>
>                                   <items>
>
>                                      <item>
>
>                                         <param1 />
>
>                                         <param2 />
>
>                                      </item>
>
>                                   </items>
>
>                                </consultaReturn>
>
>               </bpel:literal>
>
>            </bpel:from>
>
>            <bpel:to>$result</bpel:to>
>
>         </bpel:copy>
>
>         <bpel:copy>
>
>            <bpel:from>
>
>               <bpel:literal>
>
>                                <item>
>
>                                   <param1>value1</param1>
>
>                                   <param2>value2</param2>
>
>                                </item>
>
>               </bpel:literal>
>
>            </bpel:from>
>
>            <bpel:to>$auxItem</bpel:to>
>
>         </bpel:copy>
>
>         <bpel:copy>
>
>            <bpel:from>$auxItem</bpel:from>
>
>            <bpel:to>$result/items/item[$numItems]</bpel:to>
>
>         </bpel:copy>
>
>         <bpel:copy>
>
>            <bpel:from>>$numItems  + 1</bpel:from>
>
>            <bpel:to>$numItems</bpel:to>
>
>         </bpel:copy>
>
>         <bpel:copy>
>
>            <bpel:from>
>
>               <bpel:literal>
>
>                                <item>
>
>                                   <param1>value3</param1>
>
>                                   <param2>value4</param2>
>
>                                </item>
>
>               </bpel:literal>
>
>            </bpel:from>
>
>            <bpel:to>$auxItem</bpel:to>
>
>         </bpel:copy>
>
>         <bpel:copy>
>
>            <bpel:from>$auxItem</bpel:from>
>
>            <bpel:to>$result/items/item[$numItems]</bpel:to>
>
>         </bpel:copy>
>
>      </bpel:assign>
>
>     </bpel:sequence>
>
>
>
> But whit this ODE construct
>
>                 <consultaReturn>
>
>                    <items>
>
>                         <item>
>
>                            <param1>value3</param1>
>
>                            <param2>value4</param2>
>
>                         </item>
>
>                    </items>
>
>                 </consultaReturn>
>
>
>
> What is the problem? Anybody know work with unbounded elements?
>
>
>
> Thanks
>
>
>
>
>
>
>
>
>
>
>
>


Mime
View raw message