> Could the problem with your looping behavior be related
> to how webMethods creates the arrays?
…
> webMethods will not automatically give you a record list
> when the source xml only has one instance of the list in
> question.
Hi Haithem - I don’t think this is the reason. In my test case, I had initialized my outer array (Array1) with 2 elements, but a single LOOP (no outer LOOP) over “Array1[0]/Array2” still gave unexpected results. I think we’re probably just not meant to directly loop over an array whose path contains an outer array – we need an outer loop. Do let me know if you think this isn’t trie.
Hi VR - thanks man. This is sort of what I do too. Just a word of caution I’ve learnt - make sure any documentToRecord call feeding an record array to a LOOP step has its recordName set correctly.
I’ve lost many, many, many hours in cases when recordToDocument didn’t get the correct record structure. In such cases, the LOOP would work just fine for documents with 2 or more lines (in the array), but then would fail miserably for documents with only one line – since documentToRecord no longer generated an array, the LOOP would simply not be entered. My post here ties in with my other post today, on caution while setting recordName in recordToDocument.
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services