Hi Dhanush,

The standard WS-BPEL assignment only supports copying from a single to a
single element, both sides having to exist. To work with lists you either
have to use the doXslTransform standard function or one of the XPath
extensions that we provide with ODE:

http://ode.apache.org/xpath-extensions.html

Thanks,
Matthieu

On Mon, Dec 29, 2008 at 12:04 AM, Dhanush Gopinath <
[email protected]> wrote:

> Hi,
>
>
>
> I have an XML variable which has an element that can appear unlimited
> number of times. I am assigning this item to the input of an invoke
> activity, and for this I am using assign activity, and is using the copy
> operation only once.
>
>
>
> Like this :
>
>
>
> <copy>
>
>                <from>$StartWorkflowIn.Workflow1StartRequestPart
> /ns1:multipleUsers/ns1:user/ns1:userID</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:use
> rID</to>
>
>            </copy>
>
>            <copy>
>
>
> <from>$StartWorkflowIn.Workflow1StartRequestPart/ns1:multipleUsers/ns1:u
> ser/ns1:firstName</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:fir
> stName</to>
>
>            </copy>
>
>            <copy>
>
>
> <from>$StartWorkflowIn.Workflow1StartRequestPart/ns1:multipleUsers/ns1:u
> ser/ns1:lastName</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:las
> tName</to>
>
>            </copy>
>
>            <copy>
>
>
> <from>$StartWorkflowIn.Workflow1StartRequestPart/ns1:multipleUsers/ns1:u
> ser/ns1:userEmail</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:use
> rEmail</to>
>
>            </copy>
>
>            <copy>
>
>
> <from>$StartWorkflowIn.Workflow1StartRequestPart/ns1:multipleUsers/ns1:u
> ser/ns1:group/ns1:id</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:gro
> up/ns1:id</to>
>
>            </copy>
>
>            <copy>
>
>
> <from>$StartWorkflowIn.Workflow1StartRequestPart/ns1:multipleUsers/ns1:u
> ser/ns1:group/ns1:groupName</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:gro
> up/ns1:groupName</to>
>
>            </copy>
>
>            <copy>
>
>
> <from>$StartWorkflowIn.Workflow1StartRequestPart/ns1:multipleUsers/ns1:u
> ser/ns1:department</from>
>
>
> <to>$BatchMeshIn.InvokeBMSRequestPart/ns1:multipleUsers/ns1:user/ns1:dep
> artment</to>
>
>            </copy>
>
>
>
> In the above snippet, the multipleUsers element  in the variable
> $StartWorkflowIn.Workflow1StartRequestPart will contain one or more user
> element at the run time. But when it actually gets copied to
>
> $BatchMeshIn.InvokeBMSRequestPart  it will have only have a single users
> information, which is the last user in the earlier variable.
>
>
>
> Doesn't the BPEL automatically support the and loop through each of the
> users on the right hand side of the assign too ? If not how will I copy
> in this kind of scenario? Do I need to use a loop construct just for
> copying this ?
>
>
>
> Please advise. Any help is much appreciated
>
>
>
> Thanks & Regards
>
> Dhanush Gopinath
>
>

Reply via email to