Value Mapping and
Value Mapping Flattening Functoids:
Use Value Mapping and Value Mapping Flattening Functoids to
allow a Boolean value to control whether another value gets mapped.
Input:
Parameter 1: Either of the strings "true" or
"false", generally from the output of some other Logical functoid or
from a variable Boolean field in the input instance message.
Parameter 2: A value that is output if parameter 1 is
"true". This value can be from a link from a node in the source
schema that represents simple content, the output from another functoid, or a
constant input parameter.
Output:
Output 1: The value of the second parameter if the value of
the first parameter is "true". If the value of the first parameter is
not "true", the corresponding element or attribute in the output instance
message is not created.
Note:
Determine whether to use the Value Mapping functoid or the
Value Mapping (Flattening) functoid based on the following characteristics of
the relevant portions of the source and destination schemas:
Value Mapping: When
both the source and the destination schemas define parallel repeating
structures between which the relevant data is mapped.
Value Mapping
(Flattening): When the source schema
defines a repeating structure and the destination schema defines a flat
structure, such that different instances of the repeating structure in the
source schema are intended to be mapped into unique elements in the flat
structure in the destination schema.
Example:
<ns0:Root
xmlns:ns0="http://BTSMar13.ValueMappingSource">
Source Document:
<Record>
<Field
Name="X" Value="1" />
<Field
Name="Y" Value="2" />
<Field Name="Z"
Value="3" />
</Record>
<Record>
<Field
Name="X" Value="4" />
<Field
Name="Y" Value="5" />
<Field
Name="Z" Value="6" />
</Record>
<Record>
<Field
Name="X" Value="7" />
<Field
Name="Y" Value="8" />
<Field
Name="Z" Value="9" />
</Record>
</ns0:Root>
Value Mapping Destination
Document:
- <ns0:Root
xmlns:ns0="http://BTSMar13.ValueMappingDest">
<Record
X="1" />
<Record
Y="2" />
<Record
Z="3" />
<Record
X="4" />
<Record
Y="5" />
<Record
Z="6" />
<Record
X="7" />
<Record
Y="8" />
<Record
Z="9" />
</ns0:Root>
Please note that the Record and Field records are unbounded
in Source Document. The max occurs should be set as unbounded for both Record
and Field records.
Also note that Record in the Destination Document should be
unbounded as we are expecting multiple occurrences of X,Y and Z.
Value Mapping Flattening
Destination Document:
- <ns0:Root
xmlns:ns0="http://BTSMar13.ValueMappingDest">
<Record
X="1" Y="2" Z="3" />
<Record
X="4" Y="5" Z="6" />
<Record
X="7" Y="8" Z="9" />
</ns0:Root>
Please note that the Record and Field records are unbounded
in Source Document. The max occurs should be set as unbounded for both Record
and Field records.
Also note that Record in the Destination Document should be
unbounded as we are expecting multiple occurrences of X,Y and Z.
Name, value, X, Y, Z are defined as attributes not elements.
Name, value, X, Y, Z are defined as attributes not elements.