Using assign-activity:Append to append child nodes in XML-tree within loop
656772Oct 9 2008 — edited Oct 15 2008I would like to produce an XML looking something like this (just an example):
<Customer>
<Name>Tom</Name>
<Invoices>
<Invoice>
<InvoiceData>.....</InvoiceData>
</Invoice>
<Invoice>
<InvoiceData>.....</InvoiceData>
</Invoice>
</Invoices>
</Customer>
For different reasons (composite PK's in DB etc) I have to first get the Customer-data, and then get each Invoice for that customer.
Then I have to loop the Invoices and append each Invoice-node to the XML, ending up with the whole thing when the loop is finished.
This should be pretty simple (I guess), and I have tried different variations of the Append (assign activity), but everytime I end up with only the last Invoice-node.
I can see in the Flow-window of the BPEL Console that it is not the same Invoice-node I'm appending within the loop-iterations, so that can not be the case in any way.
In other words it seems to copy instead of appending.
What is wrong ?
Is this a bug in the Append function ?
Any suggestions to other approaches that might work ? (I have to use the loop to get 1 and 1 Invoice-node though, and in that way put the whole XML together in some way)
Edited by: user1694182 on 09.okt.2008 05:08