BrainDump
  Home arrow BrainDump arrow Page 3 - Microsoft BizTalk Server 2004: Creating a ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Microsoft BizTalk Server 2004: Creating a Schema Map
By: MSDN Virtual Labs
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2005-12-22

    Table of Contents:
  • Microsoft BizTalk Server 2004: Creating a Schema Map
  • Exercise 1: Creating a Schema Map using BizTalk Mapper
  • Exercise 2: Adding Functoids to a Map
  • Exercise 3: Validating and Testing the Map

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Microsoft BizTalk Server 2004: Creating a Schema Map - Exercise 2: Adding Functoids to a Map


    (Page 3 of 4 )

    Scenario

    In this exercise, you will add functoids to transform a value from a field in the source schema to a field in the destination schema.

    Tasks

    Detailed steps

    1. Add a cumulative functoid to the map.

      This functoid calculates the total quantity of all line items in the customer order before updating the total quantity in the purchase order.

    1. In the Toolbox, click the Cumulative Functoids palette, click the Cumulative Sum functoid, and then drag it to the Mapper grid.

    2. In the Source Schema pane, click the Quantity field, and then drag a link to the Cumulative Sum functoid in the Mapper grid.

    3. In the Mapper grid, click the Cumulative Sum functoid, and then drag a link to the TotalQty in the Destination Schema pane.

    1. Add a multiplication functoid to the map.

      This functoid calculates the total cost of a line item.

    1. In the Toolbox, click the Mathematical Functoids palette, click the Multiplication functoid, and then drag it to the Mapper grid.

    2. In the Source Schema pane, click the UnitPrice field, and then drag a link to the Multiplication functoid in the Mapper grid.

    3. In the Source Schema pane, click the Quantity field, and then drag a link to the Multiplication functoid in the Mapper grid.

    1. Add another cumulative functoid to the map.

      This functoid calculates the total cost of all line items in the customer order before updating the total cost in the purchase order.

    1. In the Toolbox, click the Cumulative Functoids palette, click the Cumulative Sum functoid, and then drag it to the Mapper grid.

    Make sure to place this functoid to the right of the multiplication functoid. Functoids must always link from left to right.

    1. In the Mapper grid, drag a link from the Multiplication functoid to the Cumulative Sum functoid in the Mapper grid.

    2. In the Mapper grid, drag a link from the Cumulative Sum functoid to the TotalCost field in the Destination Schema pane.

    1. Add a scripting functoid to a map.

      This step changes the value in the Priority field from an integer to a string. This function could be written in C#, Jscript.NET, XSLT, or an external assembly.

    1. In the Toolbox, click the Advanced Functoids palette, select the Scripting functoid, and then drag it to the Mapper grid.

    2. In the Source Schema pane, click the Priority field, and then drag a link to the Scripting functoid in the Mapper grid.

    3. Click the Scripting functoid, and then drag a link to the Priority field in the Destination Schema pane.

    4. Select the Scripting functoid, and press F4 (this brings up the Functoid Properties window).

    5. Select the Script property, and then click the ellipsis (…) button.

    6. In the Configure Functoid Script dialog box, in the Script type drop-down list, select Inline Visual Basic .NET, and then type the following code in the Inline script buffer text box:

      Public Function PriorityConversion(ByVal param1 As String) As String
      Select param1
         Case “1”
            Return “High”
         Case “2”
            Return “Medium”
         Case “3”
            Return “Low”
         Case Else
            Return “Error”
         End Select
      End Function

    1. Click OK to save the script and close the Functoid Properties window.

    The completed map should look similar to this:

    1. Create a new map page.

      It is not required to create a new page but it will aid in readability.

    1. Below the Map Zone, right-click the Data Maps tab, click Add Page to create a new page (or map zone), and then rename the page as Control.

    1. Add a Looping functoid to the map.

      This functoid loops through all occurrences of line items in the customer order and creates multiple line items in the purchase order.

      If no Looping functoid is present, the Mapper will try to determine how many of the destination nodes to create for each occurrence of the source node. Even if the Mapper chooses the looping that you desire, it is best for documentation purposes to explicitly use the Looping functoid.

    1. In the Toolbox, click the Advanced Functoids palette, and then drag the Looping functoid to the Mapper grid on the Control page.

    2. In the Source Schema pane, click the SalesOrderLine record, and then drag it to Looping functoid in the Mapper grid.

    3. In the Mapper grid, drag a link from the Looping functoid to the Item record in the Destination Schema pane.

    The completed map should look like this:

    1. On the File menu, click Save All.

    More BrainDump Articles
    More By MSDN Virtual Labs


       · This article is from Microsoft's Virtual Labs. We hope you found it to be enjoyable...
     

    BRAINDUMP ARTICLES

    - Internet Explorer 8 Review
    - Nilpo`s Top Windows Add-Ons
    - Beginning Silverlight 2.0 Development using ...
    - Fixing Vista`s Troubles
    - Preparing Windows Images for Mass Deployment
    - The Trouble With Vista
    - Slipstreamed and Unattended Windows Installa...
    - Microsoft Office SharePoint Server
    - Microsoft Office SharePoint Designer
    - Microsoft Windows SharePoint Services 3.0
    - Microsoft Live Mesh Overview
    - XAML Brushes and Silverlight
    - Silverlight and XAML Basics
    - Immortal XP
    - XAML Basics





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT