Using the Value Mapping Functoid

Tuesday, August 2, 2011


The Value Mapping functoid Value Mapping functoid requires two input parameters, and returns the value of the second input parameter if the value of the first parameter is "true". The following illustration shows a map with the Value Mapping functoid used in this way.
Click the illustration to enlarge or reduce.
Value Mapping functoid


To complete the map, you must set the input parameters for each functoid. The following illustration shows the property sheet for each of the three Value Mapping functoids.
Click the illustration to enlarge or reduce.
Value Mapping functoid property sheet


The following illustration shows the property sheet for the top Equal functoid.
Click the illustration to enlarge or reduce.
Equal functoid property sheet


The middle Equal functoid property sheet is similar, but its second input parameter has a constant value of Y. The bottom Equal functoid property sheet is also similar, but its second input parameter has a constant value of Z.
You might have a source document instance that contains the following element.
<Field Name="X" Value="1"/>
A Name value of X makes the top Equal functoid of the map return a value of "true". The "true" value returned by the Equal functoid makes the Attribute Value functoid that it is linked to return a value of 1.
The following code is an example of document instance that corresponds to the source specification of the map.
<Root>
  <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>
</Root>
Using this map and this source document instance, BizTalk Server outputs the following document instance.
<Root>
<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"/>
</Root>
Ee250680.important(en-US,BTS.10).gif Important
  • The Value Mapping functoid accepts Boolean input only in the form of the lowercase strings "true" and "false". For example, if a field in an incoming document instance has a value of "True" and is linked directly to the top input parameter of a Value Mapping functoid, the value of the second input parameter of the Value Mapping functoid is not passed to the output document

No comments:

Post a Comment

Post Your Comment...