Mapping Identical Arrays of Objects
When mapping an array of objects in the input to an identical array of objects (matching property names and data types) in Available data, keep the following in mind:
- Map the array at the root level by either dragging or double clicking the Available Source array. The Configure with Source screen displays the array scope and the scoping variable. You need not map the array object properties individually if you want all properties to be mapped and if the object property names are identical. The properties are automatically mapped.
- If you do not want all the properties within the object to be mapped or if the names of object properties do not match, you must map the object properties individually too after mapping the root. If you do not do the child mapping individually, the mismatched properties in the objects remain unmapped if the properties are not marked as required (marked with a red asterisk). If such a property is marked as required, then you see a warning.
- The size of the input array is determined by the size of the array in Available data to which you are mapping.
To map identical arrays of objects:
- Drag the array you want to map from
Available data (objArray in the image below) and drop it on the array in the Flow outputs pane (objArray1 in the image below). The Configure with Source screen appears in the text box. If the names of all the child elements match, the child elements get mapped automatically. You need not match each child element individually. In this example, none of the child names match, so you would need to do the individual mapping otherwise none of the elements get mapped.
The "objArray1" in the Loop name is the scoping variable that constitutes the scope of the current input array. Basically, this means that you can map any element in objArray1 with an element of the same data type in flow.objArray in the Available data. So, you are defining the scope of objArray1 to be all the elements within objArray.