webMethods

 View Only
Expand all | Collapse all

[Complex] How to Map an Array of Document Lists to another array list structure?

  • 1.  [Complex] How to Map an Array of Document Lists to another array list structure?

    Posted Tue July 23, 2024 05:14 AM

    Product/components used and version/fix level:

    Webmethos IS 10.5

    Detailed explanation of the problem:

    Hello,

    I am currently working on a project in webMethods and need assistance with mapping two or more array document lists[DataDetails] to create a characteristic array list as output.

    Error messages / full error message screenshot / log file:

    Here what I’m receiving from the database:

    I need to be able to map these arrays to the output of the service in the characteristics

    Something like:
    characteristics[0]
    characteristics[1]
    image

    Sometimes the array can be bigger.

    Can someone give me some hints in how to achieve this ?
    Thank you

    Question related to a free trial, or to a production (customer) instance?


    #webMethods-io-Integration
    #webMethods-cloud
    #webMethods-io-B2B
    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: [Complex] How to Map an Array of Document Lists to another array list structure?

    Posted Tue July 23, 2024 09:48 AM

    If I understood you correctly, you are trying to map 1 dimensional array to 2 dimensional array. If this is correct one of the output arrays should be single element array. If this is the case you can just copy characteristicsValue to the pipeline as array, loop it 1 to 1 and map it back to your list. This assumes the outer array is the array with single element. You need to initialize the array before the loop. If the inner array needs to be single element, then you can use indexes to loop that array.

    Please give an example of the output array if neither of these are the case or if it is not clear somehow.


    #webMethods-cloud
    #webMethods
    #webMethods-io-Integration
    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods-io-B2B


  • 3.  RE: [Complex] How to Map an Array of Document Lists to another array list structure?

    Posted Tue July 23, 2024 02:13 PM

    Hi,

    can you provide a sample of the field-by-field mapping, which field will be mapped to which field, please?
    From your screenshot it is difficult to find the matches.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-cloud
    #webMethods-io-B2B
    #webMethods-io-Integration
    #B2B-Integration


  • 4.  RE: [Complex] How to Map an Array of Document Lists to another array list structure?

    Posted Tue July 30, 2024 12:24 PM

    I guess you wanted to map 1 DataDetail[0] to 1 characteristics[0].

    if that is the case Loop over DataDetail, inside loop create a temp doc for characteristics and do the required mapping from DataDetail to characteristics.

    end of the loop, append temp characteristics doc to a document list


    #Integration-Server-and-ESB
    #webMethods-io-B2B
    #webMethods-io-Integration
    #webMethods-cloud
    #webMethods
    #B2B-Integration