Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 21.1.2

With help of the Mapping Editor, you can define the following mappings:

Direct mapping of attributes

Attributes from the source and target classes having the same type can be mapped directly by drawing a relation between them.

Image Modified

Literals

Attributes from the target structure can be provided with a literal value.

Image Removed

Image Added

Mapping with operations

Big data structures with complex sub-types can lead to muddled mapping diagrams. You can tidy a mapping diagram by using operations that define sub-mappings for complex sub-types.

Image Modified

For complex mapping functionality on attribute level (e.g. type conversions or concatenation of strings) you can implement action script to mapping operations.

Image Modified

Array mapping

For arrays, you can map the complete source array to the target array,

or expand the array and

map

dedicated

array elements

.
Refer to the explanations below for more details on Array Mapping.

Array Mapping

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameArray_Data_Mapping_Example
PageWithExcerptINTERNAL:_designer_examples

Regarding array mapping, all simple mapping features also apply - the only difference is that they can be applied to dedicated array elements.

Mapping the Complete Array

If the structures of the arrays are identical, you can directly connect source and target arrays with a relation. In this case, all array elements of the source array will be mapped to the target array.

Mapping Dedicated Array Elements

If the structures of the source and target arrays differ, you can expand the arrays

in a for-each loop, or expand the array and map dedicated array elements.

The above linked array example Array_Data_Mapping_Example contains a mapping diagram that shows a mapping of a (non-array) address to an address array.

Image Modified

You can map to dedicated array elements with a few simple steps:

Image Removed

Add an item to an array in a mapping diagram by clicking the Image Removed icon to the right of the array's name.

Image Removed

A new array element is displayed. In this case, this is the first array element [0] as array numbering starts with 0.

Expand the structure of the array element by clicking the little arrow to the right of the element number.

Image Removed

Now, you can start drawing the mappings as usual.

You can add multiple array elements to the mapping structure if needed, to apply different mappings for each of them.

Image Removed

Mapping Conditional Array Elements

If an input array contains multiple elements but you only want to process one element that can be identified by a dedicated attribute value, you can select this element using a condition in the index of the array.

Image Removed

In the example above, the first of all array element is selected that contains private as the content of attribute addressType. All other elements are omitted.

Expand the array, and simply double-click the index to enter a condition. Use keyword element to refer to an array element as opposed to a normal, absolute index, and build an action script expression that evaluates to Boolean.

Refer to Array Mapping for a comprehensive documentation of all possibilities.

Rp

Otp
Floatingfalse

Rp
Rde