IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Do I need to use loops to map these fields?

webMethods Community Member

webMethods Community MemberMon October 16, 2023 01:28 PM

  • 1.  Do I need to use loops to map these fields?

    Posted Mon October 16, 2023 07:28 AM

    Product/components used and version/fix level:

    IS 10.5

    Detailed explanation of the problem:

    Good afternoon.

    I’ve successfully mapped several fields for our business logic. When I test the service using SoapUI and send a large data payload, it functions correctly.

    However, when I inspect other services, I’ve noticed they use many loops, sometimes even nested ones, just to map a single field.

    This what I’m doing is correct? or do I have to use loops as well to map my fields?
    Thank you

    Error messages / full error message screenshot / log file:

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

    production (customer)


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Do I need to use loops to map these fields?

    Posted Mon October 16, 2023 09:59 AM

    Hi,

    regarding the first screen shot:
    Did you try to map the category list to the categories list directly, without mapping each single field for the list entry?
    This will only work when both lists (source and target) are expected to have the same length and (inner) structure.
    When both list will have the same length, but different structures, build loop with both lists (source as input and target as output) and map the resulting single structures inside the loop.
    When the lengths will differ somehow you need to loop over the source list only and build a new target list with appendToList functions.

    Regarding the second screenshot:
    It is not clear, what the source fields will be mapped to.
    Remember: When mapping from a document list to a single document or a set of single fields you will need to make a decision, which entry of the list (contact/contactPerson in your sample above) should be used as the source.

    When you switch the Service Designer perspective for the pipeline editor tab to another mode, you can scroll input and output independently, so you can show the matching fields together, even when they are at different locations in the pipeline.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Do I need to use loops to map these fields?

    Posted Mon October 16, 2023 01:28 PM