Introduction
BizTalk Server 2006 has come out with several improvements with the map and schema editor. In the BizTalk Mapper, several new functoids have been added. This article will explain all the new functoids added to the BizTalk Mapper toolbox.
Advanced toolbox section
There are two new functoids added to the Advanced section of the toolbox:
- Assert
- Nil value
Logical toolbox section
There are two new functoids added to the Logical section of the toolbox:
- IsNil
- Logical NOT
Mapping example
This article shall explain all the new functoids, with the help of an example. It shall also describe the various scenarios where the functoids can be used.
The input and output schemas used are self-explanatory.
Assert functoid: This functoid is always used in debugging maps. The assert functoid throws an exception and halts the build process of the map, if its "first" parameter is "false
". In the example, we check if the location == "Hyderabad"
, it throws an exception if the location is not "Hyderabad":
The build process halts in case an Assertion is raised. Have a look at the input XML file:
This screen shot shows the build process being halted, notice the Assertion Error message appearing in the output window:
Nil value functoid: This functoid is used to assign <EmployeeName xsi:nil="true" />
in the destination XML file. This functoid does not take any input values.
IsNil functoid: This functoid checks if the source file contains an element of the form <Date xsi:nil="true" />
. This functoid returns a boolean (true
or false
) value. It returns true
if the attribute xsi:nil="true"
is present.
The input XML file:
Logical NOT functoid: This functoid negates the boolean input value. If the input is true
it returns false
and vice-versa. This is very useful during the mapping of 'if
-else
' conditions. In this example, it is used to negate the value of the "=" functoid and send the appropriate value using the value-mapping functoid.
The output XML file:
Summary
With the release of BizTalk Server 2006, Microsoft has filled all the gaps in the BizTalk Mapper and the schema editor. Hence this makes the user more productive and less prone to errors.