Functoid Palette

The BizTalk 2000 Mapper utility supports highly complex transformations from one tree to another (Source specification to Destination specification) in a drag-and-drop functionality.You can drag and drop functoids from the Functoid palette (Figure 5.15) to help in the creation of these mappings.There are many functoids from which to choose, so we will spend some time here detailing each.

Figure 5.15 The Functoid Palette

Adding a Simple Functoid to a Map

To learn how to manipulate the Functoid palette and create a simple mapping with a functoid, we will choose a functoid, place it on the map, and see how it alters the XSL stylesheet in the bottom pane of the BizTalk Mapper. We will look at where the functoid sits in the code, and once we perform the steps of adding this simple functoid, we will look at the rest of the palette.The last steps include opening two predefined specifications and looking at their mappings.

1. Open the BizTalk Mapper and let's make our final changes to the specifications we created on the Months of the year.You can follow along with Figure 5.16.

Figure 5.16 Using the BizTalk Mapper to Map Specifications with a Functoid

Figure 5.16 Using the BizTalk Mapper to Map Specifications with a Functoid

2. Next, go the View menu and select the Functoid palette. A dialog box will open as shown in Figure 5.15.You can also get to the palette by clicking the little artist's paint palette in the toolbar (Figure 5.16).

3. The Functoid palette contains many tabs.We will go through each tab in the next section of this chapter, but for this exercise, please focus your attention on the default tab called String.

4. On the String tab, you will see an A. Click on the A and hold your left mouse button. Drag that A to the center grid of the BizTalk Mapper and place it, by releasing the left button, in the center of both specifications' March fields as shown in Figure 5.16. Now you need to connect the two fields together with the functoid.

5. Left-click the March Source specification field, hold the button down, drag your mouse over to the A functoid, and then release it. Do the same from the Destination specification March field to the A


You just connected two fields with a functoid. Now, let's look at how it changed the output of the XSL stylesheet.

In the following code, note that placing a functoid into your map will add a function-based script. The output of this map was taken from the Output tab of the Mapper. The bold type shows where the functoid script is placed in the XSL stylesheet.

</MySpecification2> </xsl:template>

<msxsl:script language="VBScript" implements-prefix="user"> <![CDATA[

Function FctStringUCase( p_strA )

FctStringUCase = Ucase( p_strA )

</msxsl:script> </xsl:stylesheet>

We are now going to show you exactly where this code in the XSL stylesheet comes from. In Figure 5.16, you will see the A functoid (which stands for uppercase and simply converts a text item to uppercase text). Right-click this A and go to Properties. Click on the Script tab and you will be able to match that script to what you see in the output we captured previously. This is what a functoid does; you put the icon in the grid and it puts the script you see here into the XSL stylesheet.That's it! Now that we understand the basics of functoids, let's dig into the palette as seen in Figure 5.15 and look at each tab's related function.

Was this article helpful?

0 0

Post a comment