How to map a document list in WEBMethods?

user3376708 picture user3376708 · Aug 27, 2014 · Viewed 8.6k times · Source

I want to map an array which in WebMethods is a document list. I thought that you could just map that variable over without mapping all of the children. I have done this and nothing shows in the PassArea. (PassArea is the data array that is being sent to a mainframe program afterwards.)

     A           -->         B
       Field1                 F1
       Field2                 F2
       field3                 F3

The document is A and the input document into the Natural program is B. The --> is the link that connects them together.

I don't have an image to show, because that would reveal some company information.

Answer

TchiYuan picture TchiYuan · Sep 2, 2014

If the fields of document list "A" has different names than the fields of document list "B" then no, you cannot map document list "A" to document list "B". WebMethods doesn't know which field from A corresponds to what field from "B".

You will have to do the following:

  1. LOOP over document list "A"
  2. Map each field of "A" to a generic document containing the same fields as document list "B"
  3. Append the generic document to document list "B"
  4. Drop the generic document.

Step #2 screenshot

Step #2 screenshot

Step #3 screenshot

Step #3 screenshot