Data not getting mapped correctly with pub.list:appendToDocumentList

Hi,

I am facing a problem with pub.list:appendToDocumentList.

My structure of the schema is 0040(parent Doc list) under which I will have 0050 as child and which is Doc List.
So first I am preparing 0050 as Document List and then using pub.list:appendToDocumentList, I am appending it to 0040 DocList in the schema.
Then I am preparing 0040 as Document List and then using pub.list:appendToDocumentList, I am appending it to 0040DocList in the schema.

The Problem i’m facing is - suppose I have 2 Records in 0050 like 0050[0], 0050[1] and in 0040 I have 3 records say 0040[0], 0040[1], 0040[2].
When I map 0050[0], 0050[1], they are getting appended to 0040[0]. But the problem is that the data present in 0040[0] is getting mapped to 0040[1] and that of 0040[1] is getting mapped to 0040[2] and 0040[2] is getting mapped to 0040[3].so I am getting one more extra 0040[3].this is wrong.

I want the 0040[0] to have its own data and 0050[0],0050[1].
0040[1] should have its own data and no Children.
0040[2] should have its own data and no Children.

Can you please let me know the resolution for this?

Thanks,

Lots and lots of messages here on AppendToDocumentList, some dealing with the issue you are describing. Please use the search function to find them.

Mark

Hi,

after using the appendToDocumentList each time, you need to drop the input to the service from the pipeline.

for your case drop temporary 0040 doclist “0040DocList” after appending that to the original 0040 document list.

This should resolve your problem.

Thanks,
Sukanta

Hi,

you can achieve this by droping variable after its use…

i mean, that once your mapining is done … drop the source document…

–Shaik

Yep, you need to drop the document, also watch out for the standard webMethods trick of eating the outer document.

]Monty[

Can you elaborate on this? The “eating the outer document” I mean.

Lets say you have a document called Monty and inside you have 2 fields, One and Two. When you add the document, using this service you get an array entry of One and Two as part of doclist[n], not doclist[n] being a Monty document. It is kind of wierd, but try it you’ll see what I mean. Oh and this is ‘by design’

]Monty[

What do you pass as the doc list? The toList actually.

Can you post all the inputs that you pass to the appendToDocList service? I want to make sure I’m replicating exactly what you’re seeing.