Hi,
I am trying to use 2 appendToRecordLists, one after the other, in the same loop, in order to capture 2 sets of values. However, the problem I am running into is that since the records are not actually appended as entries to the “toList” and there is a reference to the “fromList”, everytime the value of “fromList” changes the data gets crossed between the lists. How can I keep the 2 separate and yet get the individual recordlists for the 2 parameters? Your expertise in this area is solicited.
Thanks in advance for all the replies.
Anant
I understand your problem.its little bit tricky you need to do.
So try out this way for any list appendings.
In side your loop what ever you are mapping for that particular parameters, just create a temp Record structure which is similar like the originial RecordList structure which you want to append.And do map for the temp Record which u just created ,remember it will be inside the loop
So after u done all the mapping to that temp Record,come out of the loop and invoke appendToRecordList service and
map the temp Record to input fromItem and also map input toList(which is your Original RecordList)
and the output toList will be again the same Original RecordList.
Thats it you have to do…
And test the whole map…
Hope this solves your problem.
Cheers.
One thing to try is to use a FlowMap transformer. You have to explicitly map all inputs and outputs to form the ‘pipelet’ that the transformer sees, so there won’t be name collisions in your main pipeline.
If there will be a lot of iterations of these loops (say >50 items appended), you may want to use more optimal list handling services. appendToRecordList and appendToStringList have to reallocate the array and copy the array contents on every call. See WmSamples samples.complexMapping large mapping example.
Cheers,
Fred