Tutorial 2purchase Order Process
Tutorial 2purchase Order Process
Microsoft Corporation
Published:
Abstract
This document provides step-by-step instructions for implementing a BizTalk solution for the ERP system that
generates purchase orders from the request messages and sends them to an external partner.
Tutorial 2: Purchase Order Process
Table of Contents
Tutorial 2: Purchase Order Process .................................................................. .................3
Lesson 1: Set Up the Supplier Side ................................................................. ...............3
Step 1: Set Up the Accounts for the Tutorial ........................................................ ........4
Step 2: Windows XP and Windows 2000 Only - Enable Web Service Publishing .......6
Step 3: Exclude the Root Directory from Windows SharePoint Services Managed Paths
...................................................................................................................................... ........8
Step 4: Set Up the Supplier Web Service ........................................................... .........9
Lesson 2: Create the B2B Solution ...................................................................... .........10
Step 1: Open a Blank Solution .............................................................................. .....11
Step 2: Add the Projects to the Solution .................................................. ..................12
Step 3: Add a Reference to the Supplier's Web Service ...................................... ......13
Step 4: Add Existing Schemas and Maps .......................................................... ........15
Lesson 3: Add Functoids to the Map ......................................................................... ....16
Step 1: Add a Date/Time Functoid to the Map ........................................ ......................16
Step 2: Add a Multiplication Functoid to the Map ................................................... ....18
Step 3: Add a Looping Functoid to the Map ............................................................ ...19
Step 4: Add a Record Count Functoid to the Map ............................... ......................21
Step 5: Add a Cumulative Sum Functoid to the Map ................................ .................22
Step 6: Assign a Constant Value in the Map ......................................................... .....23
Step 7: Build the B2BSchema Project and Test the Map .................................. .........25
Lesson 4: Design the Purchase Order Process .............................................. ..............27
Step 1: Add an Orchestration to the Solution .......................................................... ...27
Step 2: Add a Reference to the B2BSchemas Project ......................................... ......29
Step 3: Create the Purchase Order Process ......................................... ....................31
Step 4: Create the Message Instance Variables .................................................. ......39
Step 5: Configure the Message Assignment Shape ..................................................42
Step 6: Configure the Transform Shape .................................................. ..................44
Step 7: Create and Configure the Internal Ports .................................................... ....46
Step 8: Create and Configure the External Port ................................... .....................48
Step 9: Connect the Ports ................................................................ .........................50
Lesson 5: Deploy and Test the Solution ................................................................. .......51
Step 1: Build and Deploy the Solution ..................................................... ..................52
Step 2: Configure and Start the Application ....................................................... ........54
Step 3: Test the Solution ........................................................................................ ....57
2
Tutorial 2: Purchase Order Process
In This Section
• Lesson 1: Set Up the Supplier Side
• Lesson 2: Create the B2B Solution
• Lesson 3: Add Functoids to the Map
• Lesson 4: Design the Purchase Order Process
• Lesson 5: Deploy and Test the Solution
3
Tutorial 2: Purchase Order Process
In This Section
• Step 1: Set Up the Accounts for the Tutorial
• Step 2: Windows XP and Windows 2000 Only - Enable Web Service Publishing
• Step 3: Exclude the Root Directory from Windows SharePoint Services Managed Paths
• Step 4: Set Up the Supplier Web Service
Windows XP, Windows 2000 BizTalk Isolated Host The BizTalk Isolated Host Users
Server, and Windows Users group gives transports that run
Server 2003 outside of the BizTalk Server
process, such as HTTP and
SOAP transports, access to
BizTalk Server databases. The
BizTalk Isolated Host Users
group provides Windows
Integrated Security access to the
Microsoft SQL Server computer
that contains the BizTalk
Management database.
Note
The BizTalk
Management database
is also referred to as the
BizTalk Configuration
database.
4
Tutorial 2: Purchase Order Process
Note
This procedure assumes that the account you are adding to these groups already exists
on the computer.
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete the steps in Before You Begin the Tutorials.
• You must log on as a member of the BizTalk Server Administrators group.
5
Tutorial 2: Purchase Order Process
Management.
2. In Computer Management, expand Local Users and Groups, and then click Groups.
3. In the Groups results pane, right-click IIS_WPG, and then click Properties.
4. In the IIS_WPG Properties dialog box, in the Members list, check for the account you
are using to set up and run this tutorial.
If the account is not in the Members list, do the following:
a. Click Add.
b. In the Select Users, Computers, or Groups dialog box, in the Enter the object
name to select box, type the account name in the form <domain>\account name,
and then click OK.
5. Click OK.
Next Steps
You configure Internet Information Services (IIS) and Windows user and group accounts to
enable Web service publishing in Step 2: Windows XP and Windows 2000 Only - Enable Web
Service Publishing.
See Also
Lesson 1: Set Up the Supplier Side
Step 2: Windows XP and Windows 2000 Only - Enable Web Service Publishing
Step 3: Exclude the Root Directory from Windows SharePoint Services Managed Paths
Step 4: Set Up the Supplier Web Service
6
Tutorial 2: Purchase Order Process
For more information about publishing Web services in BizTalk Server 2006, see Publishing
Web Services.
Important
The following procedures provide the steps required to enable Web service publishing for
the tutorials for Windows 2000 Server. Do not perform the tasks in this step if you have
Windows Server 2003 installed.
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 1: Set Up the Accounts for the Tutorial.
• You must log on as a member of the BizTalk Server Administrators group.
Note
If BizTalk Isolated Host was installed as Trusted, the user that acquires
authentication when running the Web service must also be added to the BizTalk
Isolated Host Users group. For instructions, see Step 1: Set Up the Accounts for
the Tutorial. When using anonymous access, this user account is usually the
IUSR_<machine name> account.
6. Click OK to close the BizTalk Isolated Host Users Properties dialog box.
For information about that specific ASP.NET account, see
http://go.microsoft.com/fwlink/?LinkId=21106.
Next Steps
You exclude the root directory from Microsoft Windows SharePoint Services managed paths in
Step 3: Exclude the Root Directory from Windows SharePoint Services Managed Paths.
See Also
Lesson 1: Set Up the Supplier Side
7
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 2: Windows XP and Windows 2000 Only -
Enable Web Service Publishing.
Note
If you are using Windows Server 2003, you should not perform Step 2.
• You must log on as a member of the BizTalk Server Administrators group.
To exclude the root directory from Windows SharePoint Services managed paths
1. Click Start, point to Programs, point to Administrative Tools, and then click
SharePoint Central Administration.
2. On the Windows SharePoint Services Central Administration page, in the Virtual
Server Configuration section, click Configure virtual server settings.
3. On the Virtual Server List page, click Default Web Site.
4. On the Virtual Server Settings page, in the Virtual Server Management section, click
Define managed paths.
5. On the Define Managed Paths page, in the Included Paths section, select the (root)
check box, and then click Remove selected paths.
6. Close the browser window.
8
Tutorial 2: Purchase Order Process
Next Steps
You enable Web service publishing by configuring Internet Information Services (IIS) and
Windows user and group accounts in Lesson 2: Create the B2B Solution.
See Also
Lesson 1: Set Up the Supplier Side
Step 1: Set Up the Accounts for the Tutorial
Step 2: Windows XP and Windows 2000 Only - Enable Web Service Publishing
Step 4: Set Up the Supplier Web Service
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 3: Exclude the Root Directory from
Windows SharePoint Services Managed Paths.
• You must log on as a member of the BizTalk Server Administrators group.
Important
The Setup.bat file in the following procedure assumes that you are running the
tutorial from your C drive. If you are running from a different drive, you must edit
the file and modify the target location manually.
9
Tutorial 2: Purchase Order Process
C:\Tutorial\Solutions\SupplierWebServices\ Setup.bat
C:\Tutorial\Solutions\ SetInstallPathEnv.vbs
C:\Tutorial\Solutions\B2BSolution\ SetupWebService.bat
Note
If you receive a 404 error while running the Setup.bat file, you must use the
SharePoint Central Administration tool to exclude the B2BSupplierProcessPO
and B2BSupplierProcessPayment virtual directories from Windows SharePoint
Services managed paths. For more information, see "About Managed Paths" in
Windows SharePoint Services Help.
Note
If there is no C:\Tutorial\Solutions folder, you must install the tutorial files before
you proceed. For instructions about installing the tutorial files, see Step 1: Install
the Tutorial Files.
Next Steps
You set up the business-to-business (B2B) solution and projects, add a reference to the supplier's
Web service, and add existing items to one of the projects in Lesson 2: Create the B2B Solution.
See Also
Lesson 1: Set Up the Supplier Side
Step 1: Set Up the Accounts for the Tutorial
Step 2: Windows XP and Windows 2000 Only - Enable Web Service Publishing
Step 3: Exclude the Root Directory from Windows SharePoint Services Managed Paths
In This Section
• Step 1: Open a Blank Solution
• Step 2: Add the Projects to the Solution
• Step 3: Add a Reference to the Supplier's Web Service
• Step 4: Add Existing Schemas and Maps
10
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete the steps in Lesson 1: Set Up the Supplier
Side.
• You must log on as a member of the BizTalk Server Administrators group.
Create directory for solution Select this check box to automatically create
the C:\Tutorial\Lessons\B2BSolution
directory.
4. Click OK.
Visual Studio 2005 adds both the B2BSolution solution and a B2BSolution project. We do
not use the B2BSolution project.
Note
11
Tutorial 2: Purchase Order Process
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 2: Add the Projects to the Solution.
Next Steps
You add two projects to the B2BSolution solution that will hold the items that you add to the
solution in Step 2: Add the Projects to the Solution.
See Also
Lesson 2: Create the B2B Solution
Step 2: Add the Projects to the Solution
Step 3: Add a Reference to the Supplier's Web Service
Step 4: Add Existing Schemas and Maps
Important
Do not change the name of a project after you create it. The project name is
automatically included in the namespaces for all items within the project. Changing the
name of a project after you create it causes compilation errors because the namespace
in each item does not match the name of the project.
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 1: Open a Blank Solution.
• You must log on as a member of the BizTalk Server Administrators group.
12
Tutorial 2: Purchase Order Process
2. In Visual Studio 2005, on the File menu, point to Open, and then click Project/Solution.
3. In the Open Project dialog box, click B2BSolution, and then click Open.
4. In Solution Explorer, right-click Solution 'B2BSolution', point to Add, and then click New
Project.
5. In the Add New Project dialog box, do the following:
6. Click OK.
7. Repeat steps 4 through 6 to create a second project in the solution named
B2BOrchestrations.
8. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 3: Add a Reference to the Supplier's Web Service.
Next Steps
You add a Web reference that connects the B2BSolution to the supplier's Web service in Step 3:
Add a Reference to the Supplier's Web Service.
See Also
Lesson 2: Create the B2B Solution
Step 1: Open a Blank Solution
Step 3: Add a Reference to the Supplier's Web Service
Step 4: Add Existing Schemas and Maps
13
Tutorial 2: Purchase Order Process
Objective: In this step, you add a Web reference that connects the B2BSolution to the supplier's
Web service.
Purpose: When you add a Web reference, the items within the Web service become available to
your solution. The supplier Web service that you use for this tutorial has two services, one for the
purchase order and one for the payment. You add both in the following procedure.
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 2: Add the Projects to the Solution.
• You must log on as a member of the BizTalk Server Administrators group.
Note
localhost and localhost1 are now listed in Solution Explorer under Web
References.
8. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 4: Add Existing Schemas and Maps.
Next Steps
You add existing schemas and maps to the B2BSchemas project in Step 4: Add Existing
Schemas and Maps.
14
Tutorial 2: Purchase Order Process
See Also
Lesson 2: Create the B2B Solution
Step 1: Open a Blank Solution
Step 2: Add the Projects to the Solution
Step 4: Add Existing Schemas and Maps
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete the steps in Step 3: Add a Reference to the
Supplier's Web Service.
• You must log on as a member of the BizTalk Server Administrators group.
Note
15
Tutorial 2: Purchase Order Process
You will use the PO.xsd schema and the MapToCommonPO.btm map in this
lesson, and the remaining schemas and map in Tutorial 3: Invoice and
Payment Process.
6. Click Add.
7. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Lesson 3: Add Functoids to the Map.
Next Steps
You add functoids to the MapToCommonPO map that you added to the B2BSchemas project in
Lesson 3: Add Functoids to the Map.
See Also
Lesson 2: Create the B2B Solution
Step 1: Open a Blank Solution
Step 2: Add the Projects to the Solution
Step 3: Add a Reference to the Supplier's Web Service
In This Section
• Step 1: Add a Date/Time Functoid to the Map
• Step 2: Add a Multiplication Functoid to the Map
• Step 3: Add a Looping Functoid to the Map
• Step 4: Add a Record Count Functoid to the Map
• Step 5: Add a Cumulative Sum Functoid to the Map
• Step 6: Assign a Constant Value in the Map
• Step 7: Build the B2BSchema Project and Test the Map
16
Tutorial 2: Purchase Order Process
Objective: In this step, you add a Date functoid to the MapToCommonPO map.
Purpose: You add functoids to a map to transform data that is mapped from the source schema
to the destination schema. The Date functoid you add in this step generates the current date
stamp for the CreationDate field in CommonPO. For more information, see Date and Time
Functoids [BTS05].
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Lesson 2: Create the B2B Solution.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Right-click the root node, and click Expand Tree Node.
6. On the View menu, click Toolbox, and then in the Toolbox, click the pushpin to dock it.
7. In the Toolbox, expand Date/Time Functoids, drag the Date functoid to the mapping
grid, and drop it parallel to CommonPO\POHeader\CreationDate in the destination
schema.
8. In the Destination Schema schema tree, select and drag the CreationDate field to the
Date functoid in the mapping grid.
9. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 2: Add a Multiplication Functoid to the Map.
Next Steps
You add a Multiplication functoid to the MapToCommonPO map in Step 2: Add a Multiplication
Functoid to the Map.
17
Tutorial 2: Purchase Order Process
See Also
Lesson 3: Add Functoids to the Map
Step 2: Add a Multiplication Functoid to the Map
Step 3: Add a Looping Functoid to the Map
Step 4: Add a Record Count Functoid to the Map
Step 5: Add a Cumulative Sum Functoid to the Map
Step 6: Assign a Constant Value in the Map
Step 7: Build the B2BSchema Project and Test the Map
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 1: Add a Date/Time Functoid to the Map.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Right-click the root node, and click Expand Tree Node.
6. On the View menu, click Toolbox, and then in the Toolbox, click the pushpin to dock it.
7. In the Toolbox, expand MathematicalFunctoids, and then drag the Multiplication
functoid to the mapping grid near the Item node in the source schema.
8. In the Source Schema tree, drag the Item\Quantity field to the functoid.
18
Tutorial 2: Purchase Order Process
Note
You may have to scroll the schema trees to find the node. You must drag the
node to the functoid. Attempting to drag the functoid just moves it within the
mapping grid.
9. In the Source Schema tree, drag the Item\Price field to the functoid.
10. In the Destination Schema, expand
Item\ItemHeader\<Equivalent>\<ItemHeaderType>, and then drag the Multiplication
functoid to the ExtendedPrice field in the Destination Schema tree.
11. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 3: Add a Looping Functoid to the Map.
Next Steps
You add a Looping functoid to the MapToCommonPO map in Step 3: Add a Looping Functoid to
the Map.
See Also
Lesson 3: Add Functoids to the Map
Step 1: Add a Date/Time Functoid to the Map
Step 3: Add a Looping Functoid to the Map
Step 4: Add a Record Count Functoid to the Map
Step 5: Add a Cumulative Sum Functoid to the Map
Step 6: Assign a Constant Value in the Map
Step 7: Build the B2BSchema Project and Test the Map
Prerequisites
Note the following requirements before you begin this step:
19
Tutorial 2: Purchase Order Process
• Before you begin this step you must complete Step 2: Add a Multiplication Functoid to the
Map.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Right-click the root node, and then click Expand Tree Node.
6. On the View menu, click Toolbox, and then in the Toolbox, click the pushpin to dock it.
7. In the Toolbox, expand AdvancedFunctoids, and then drag the Looping functoid to the
mapping grid near the Item node in the source schema.
8. In the Source Schema tree, drag the Item node to the Looping functoid.
9. In the Destination Schema tree, drag the Item node to the Looping functoid.
10. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 4: Add a Record Count Functoid to the Map.
Next Steps
You add a Record Count functoid to the MapToCommonPO map in Step 4: Add a Record Count
Functoid to the Map.
See Also
Lesson 3: Add Functoids to the Map
Step 1: Add a Date/Time Functoid to the Map
Step 2: Add a Multiplication Functoid to the Map
Step 4: Add a Record Count Functoid to the Map
Step 5: Add a Cumulative Sum Functoid to the Map
Step 6: Assign a Constant Value in the Map
Step 7: Build the B2BSchema Project and Test the Map
20
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 3: Add a Looping Functoid to the Map.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Right-click the root node, and click Expand Tree Node.
6. On the View menu, click Toolbox, and then in the Toolbox, click the pushpin to dock it.
7. In the Toolbox, expand Advanced Functoids, and then drag the Record Count functoid
to the mapping grid near the Item node in the source schema.
8. In the Source Schema tree, drag the Item node to the Record Count functoid.
9. In the Destination Schema tree, drag Total\LineItemTotal to the Record Count
functoid.
10. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 5: Add a Cumulative Sum Functoid to the Map.
21
Tutorial 2: Purchase Order Process
Next Steps
You add a Cumulative Sum functoid to the MapToCommonPO map in Step 5: Add a Cumulative
Sum Functoid to the Map.
See Also
Lesson 3: Add Functoids to the Map
Step 1: Add a Date/Time Functoid to the Map
Step 2: Add a Multiplication Functoid to the Map
Step 3: Add a Looping Functoid to the Map
Step 5: Add a Cumulative Sum Functoid to the Map
Step 6: Assign a Constant Value in the Map
Step 7: Build the B2BSchema Project and Test the Map
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 4: Add a Record Count Functoid to the
Map.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Right-click the root node, and then click Expand Tree Node.
6. On the View menu, click Toolbox, and then in the Toolbox, click the pushpin to dock it.
22
Tutorial 2: Purchase Order Process
7. In the Toolbox, expand CumulativeFunctoids, and then drag the Cumulative Sum
functoid to the mapping grid near the Item node.
8. In the Source Schema tree, drag the Item\Quantity field to the functoid.
9. In the Destination Schema tree, drag the Total\QuantityTotal field to the functoid.
10. In the Toolbox, drag a second Cumulative Sum functoid to the mapping grid and place
it to the right of the Multiplication functoid.
Note
Functoids are executed from left to right. When you construct a map that uses
more than one functoid, you must consider the relative left-to-right placement of
the functoids. The output of a functoid can only be input to another functoid that
is farther to the right.
11. On the mapping grid, select the Multiplication functoid and drag it to the Cumulative
Sum functoid.
12. In the Destination Schema tree, drag the Total\POTotal field to the Cumulative Sum
functoid.
13. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 6: Assign a Constant Value in the Map.
Next Steps
You add a constant value to the map in Step 6: Assign a Constant Value in the Map.
See Also
Lesson 3: Add Functoids to the Map
Step 1: Add a Date/Time Functoid to the Map
Step 2: Add a Multiplication Functoid to the Map
Step 3: Add a Looping Functoid to the Map
Step 4: Add a Record Count Functoid to the Map
Step 6: Assign a Constant Value in the Map
Step 7: Build the B2BSchema Project and Test the Map
23
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 5: Add a Cumulative Sum Functoid to the
Map.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Right-click the root node, and then click Expand Tree Node.
6. In the Destination Schema tree, click the BillTo/Address/Name field.
7. On the View menu, click Properties Window.
8. In the Properties pane, in the Value combo box, type My Company Name, and then
press ENTER.
9. On the File menu, click Save All.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Step 7: Build the B2BSchema Project and Test the Map.
Next Steps
You build the B2BSchemas project and you test the MapToCommonPO map in Step 7: Build the
B2BSchema Project and Test the Map.
See Also
Lesson 3: Add Functoids to the Map
24
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 6: Assign a Constant Value in the Map.
• You must log on as a member of the BizTalk Server Administrators group.
25
Tutorial 2: Purchase Order Process
Note
You created the Tutorial.snk
strong name key file in Step 4:
Create a Strong Name Key
File.
8. Click Open.
9. In the B2BSchemas Properties Pages dialog box, in the tree control, expand
Configuration Properties, and then click Deployment.
10. On the Deployment page, do the following:
Note
The MapToCommonPO.btm Property Pages dialog box uses a grid control.
You must click in the property row to expose the property control. A control is a
device you use to select options, such as a drop-down list.
3. In the Select Input File dialog box, browse to C:\Tutorial, select POInstance.xml, and
then click Open.
4. In the MapToCommonPO.btm Property Pages dialog box, in the TestMapInput drop-
down list, select XML, and then click OK.
5. In Solution Explorer, right-click MapToCommonPO.btm, and then click Test Map.
6. On the Output tab located at the bottom of the screen, verify that the test succeeded and
open the output file specified on the Output tab.
The output file shows you what the PO XML document looks like after it is transformed by
the map.
7. On the File menu, click Save All.
26
Tutorial 2: Purchase Order Process
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Lesson 4: Design the Purchase Order Process.
Next Steps
You create the orchestration for the B2BSolution in Lesson 4: Design the Purchase Order
Process.
See Also
Lesson 3: Add Functoids to the Map
Step 1: Add a Date/Time Functoid to the Map
Step 2: Add a Multiplication Functoid to the Map
Step 3: Add a Looping Functoid to the Map
Step 4: Add a Record Count Functoid to the Map
Step 5: Add a Cumulative Sum Functoid to the Map
Step 6: Assign a Constant Value in the Map
In This Section
• Step 1: Add an Orchestration to the Solution
• Step 2: Add a Reference to the B2BSchemas Project
• Step 3: Create the Purchase Order Process
• Step 4: Create the Message Instance Variables
• Step 5: Configure the Message Assignment Shape
• Step 6: Configure the Transform Shape
• Step 7: Create and Configure the Internal Ports
• Step 8: Create and Configure the External Port
• Step 9: Connect the Ports
27
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Lesson 3: Add Functoids to the Map.
• You must log on as a member of the BizTalk Server Administrators group.
Name TypeB2BProcess.odx.
6. Click Add.
The following figure shows the orchestration design surface for the B2BProcess
orchestration.
Note
If the Toolbox is not docked on the left side, on the View menu, click Toolbox.
7. On the File menu, click Save All to save your work.
Note
28
Tutorial 2: Purchase Order Process
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 2: Add a Reference to the B2BSchemas Project.
Next Steps
You add a reference from the B2BOrchestrations project to the B2BSchemas project in Step 2:
Add a Reference to the B2BSchemas Project.
See Also
Lesson 4: Design the Purchase Order Process
Step 2: Add a Reference to the B2BSchemas Project
Step 3: Create the Purchase Order Process
Step 4: Create the Message Instance Variables
Step 5: Configure the Message Assignment Shape
Step 6: Configure the Transform Shape
Step 7: Create and Configure the Internal Ports
Step 8: Create and Configure the External Port
Step 9: Connect the Ports
Note
Notice that after this step, the B2BOrchestrations project is dependent on the
B2Bschemas project. This relationship defines the order in which the projects must be
built and deployed. You must build your projects in reverse order of dependency, starting
from the independent assemblies (in this case B2BSchemas), and then moving on to the
assemblies that are dependent upon those developed earlier (in this case
B2BOrchestrations).
29
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• You must build the B2BSchemas project before you begin this step. You built the
B2BSchemas project in the previous lesson when you completed Step 7: Build the
B2BSchema Project and Test the Map.
• Before you begin this step you must complete Step 1: Add an Orchestration to the Solution.
• You must log on as a member of the BizTalk Server Administrators group.
Note
Changing the Copy Local property refreshes the reference. Theoretically, you
should be able to set the Copy Local property to False, because that is the
setting that ensures that the contents of the B2BSchemas project are available to
the B2BOrchestrations project. There is an issue with Visual Studio 2005,
however, that makes this inadvisable. For more information, see the Knowledge
Base article 313512, "BUG: "Could not copy temporary files to the output
directory" error message when you build a solution that contains multiple
projects" available at http://go.microsoft.com/fwlink/?LinkId=62208.
10. On the File menu, click Save All to save your work.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 3: Create the Purchase Order Process.
30
Tutorial 2: Purchase Order Process
Next Steps
You add action shapes to the B2BProcess orchestration in Step 3: Create the Purchase Order
Process.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 3: Create the Purchase Order Process
Step 4: Create the Message Instance Variables
Step 5: Configure the Message Assignment Shape
Step 6: Configure the Transform Shape
Step 7: Create and Configure the Internal Ports
Step 8: Create and Configure the External Port
Step 9: Connect the Ports
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 2: Add a Reference to the B2BSchemas
Project.
• You must log on as a member of the BizTalk Server Administrators group.
31
Tutorial 2: Purchase Order Process
6. On the orchestration design surface, right-click the Receive shape, and then click
Properties Window.
7. In the Properties pane, change the Name property to Receive_PO and set Activate to
True.
8. From the Toolbox, drag the Parallel Actions shape to the orchestration design surface
and drop the shape on the connecting line directly below the Receive_PO shape.
The Parallel Actions shape expands to show two branches for different actions that take
place concurrently but independently.
The following figure shows the orchestration with the new Parallel Actions shape.
32
Tutorial 2: Purchase Order Process
9. On the orchestration design surface, right-click the Parallel Actions shape, and then
click Properties Window.
10. In the Properties pane, change the Name property to Route_PO.
11. From the Toolbox, drag the Message Assignment shape to the orchestration design
surface, and drop the shape on the left side in the Route_PO shape.
Note
When you drop the Message Assignment shape on the design surface,
Orchestration Designer creates the enclosing Construct Message shape for
you.
The following figure shows the orchestration with the new Message Assignment shape.
33
Tutorial 2: Purchase Order Process
12. On the orchestration design surface, right-click the ConstructMessage_1 shape, and
then click Properties Window.
13. In the Properties pane, change the Name property to Construct_POConfirmed.
14. From the Toolbox, drag the Send shape to the orchestration design surface, drop the
shape on the connecting line directly below the Construct_POConfirmed shape.
Warning
Do not drop the Send shape inside the Construct Message shape. It must be
placed outside the Construct Message shape and inside the Parallel Actions
shape.
The following figure shows the orchestration with the new Send shape.
34
Tutorial 2: Purchase Order Process
15. On the orchestration design surface, right-click the Send shape, and then click
Properties Window.
16. In the Properties pane, change the Name property to Send_POConfirmed.
17. From the Toolbox, drag the Transform shape to the orchestration design surface, and
drop the shape on the right side of the Route_PO shape.
Note
When you drop the Transform shape on the design surface, Orchestration
Designer creates the enclosing Construct Message shape for you.
The following figure shows the orchestration with the new Transform shape.
35
Tutorial 2: Purchase Order Process
18. On the orchestration design surface, right-click the ConstructMessage shape, and then
click Properties Window.
19. In the Properties pane, change the Name property to Construct_CommonPO.
20. From the Toolbox, drag the Send shape to the orchestration design surface, and drop the
shape on the connecting line directly below the Construct_CommonPO shape.
The following figure shows the orchestration with the new Send shape.
36
Tutorial 2: Purchase Order Process
21. On the orchestration design surface, right-click the Send shape, and then click
Properties Window.
22. In the Properties pane, change the Name property to Send_CommonPO.
The following figure shows the completed orchestration.
37
Tutorial 2: Purchase Order Process
Note
Some orchestration shapes show an insufficient configuration Smart Tag. You will
add the missing information to the shapes in other steps in this lesson.
The following figure shows the insufficient configuration Smart Tag.
23. On the File menu, click Save All to save your work.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 4: Create the Message Instance Variables.
38
Tutorial 2: Purchase Order Process
Next Steps
You create variables for the message instances and connect the messages to schemas in Step 4:
Create the Message Instance Variables. You added the schemas to the B2BSchemas project in
Lesson 2: Create the B2B Solution.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 2: Add a Reference to the B2BSchemas Project
Step 4: Create the Message Instance Variables
Step 5: Configure the Message Assignment Shape
Step 6: Configure the Transform Shape
Step 7: Create and Configure the Internal Ports
Step 8: Create and Configure the External Port
Step 9: Connect the Ports
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 3: Create the Purchase Order Process.
• You must log on as a member of the BizTalk Server Administrators group.
39
Tutorial 2: Purchase Order Process
Window.
7. In the Properties pane, do the following:
8. In the Select Artifact Type dialog box, select B2BSchemas, from the TypeName | Fully
Qualified Name list, select B2BSchemas.PO, and then click OK.
The following figure shows the Select Artifact Type dialog box.
9. Repeat steps 5 through 8 to create two additional new messages with the following
parameters:
40
Tutorial 2: Purchase Order Process
10. On the File menu, click Save All to save your work.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 5: Configure the Message Assignment Shape.
Next Steps
You enter an expression as the POConfirmed message in the B2BProcess orchestration in Step
5: Configure the Message Assignment Shape.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 2: Add a Reference to the B2BSchemas Project
Step 3: Create the Purchase Order Process
Step 5: Configure the Message Assignment Shape
Step 6: Configure the Transform Shape
Step 7: Create and Configure the Internal Ports
Step 8: Create and Configure the External Port
Step 9: Connect the Ports
41
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 4: Create the Message Instance
Variables.
• You must log on as a member of the BizTalk Server Administrators group.
42
Tutorial 2: Purchase Order Process
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 6: Configure the Transform Shape.
43
Tutorial 2: Purchase Order Process
Next Steps
You specify the MapToCommonPO map in the Transform shape in Step 6: Configure the
Transform Shape.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 2: Add a Reference to the B2BSchemas Project
Step 3: Create the Purchase Order Process
Step 4: Create the Message Instance Variables
Step 6: Configure the Transform Shape
Step 7: Create and Configure the Internal Ports
Step 8: Create and Configure the External Port
Step 9: Connect the Ports
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 5: Configure the Message Assignment
Shape.
• You must log on as a member of the BizTalk Server Administrators group.
44
Tutorial 2: Purchase Order Process
Note
The Source Transform section of the Transform Configuration dialog box is a
grid control. You must click in the cell under Variable Name to expose the
control. A control is a device you use to select options, such as a drop-down list.
12. In the Transform Configuration dialog box, click Destination, and then from the
Destination Transform drop-down list, select CommonPO_Instance.InputPO_xml.
Note
The red X next to the Destination tab does not go away when you select the
destination transform value. Click Source to refresh the dialog box.
13. Click OK.
14. On the File menu, click Save All to save your work.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 7: Create and Configure the Internal Ports.
Next Steps
You add two ports to the orchestration in Step 7: Create and Configure the Internal Ports.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
45
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 6: Configure the Transform Shape.
• You must log on as a member of the BizTalk Server Administrators group.
Note
When you drop a port onto the Port Surface, the Port Configuration Wizard
begins automatically.
6. On the Welcome to the Port Configuration Wizard page, click Next.
7. On the Port Properties page, in the Name field, type ReceivePO_Port, and then click
Next.
8. On the Select a Port Type page, do the following:
46
Tutorial 2: Purchase Order Process
Select the port type to be used for this Select the Create a new Port Type option.
port
9. Click Next.
10. On the Port Binding page, do the following:
Port direction of communication From the drop-down list, select I'll always
be receiving messages on this port.
Property Value
13. On the File menu, click Save All to save your work.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 8: Create and Configure the External Port.
47
Tutorial 2: Purchase Order Process
Next Steps
You add another port to the orchestration in Step 8: Create and Configure the External Port.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 2: Add a Reference to the B2BSchemas Project
Step 3: Create the Purchase Order Process
Step 4: Create the Message Instance Variables
Step 5: Configure the Message Assignment Shape
Step 6: Configure the Transform Shape
Step 8: Create and Configure the External Port
Step 9: Connect the Ports
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 7: Create and Configure the Internal
Ports.
• You must log on as a member of the BizTalk Server Administrators group.
Note
48
Tutorial 2: Purchase Order Process
When you drop a port onto the Port Surface, the Port Configuration Wizard
begins automatically.
6. On the Welcome to the Port Configuration Wizard page, click Next.
7. On the Port Properties page, in the Name field, type SendCommonPO_Port,and then
click Next.
8. On the Select a Port Type page, do the following:
Select the port type to be used for this Select the Create a new Port Type option.
port
9. Click Next.
10. On the Port Binding page, do the following:
Port direction of communication From the drop-down list, select I'll always
be sending messages on this port.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to the next step, Step 9: Connect the Ports.
Next Steps
You connect messages and action shapes to the ports you created in the last two steps in Step 9:
Connect the Ports.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 2: Add a Reference to the B2BSchemas Project
Step 3: Create the Purchase Order Process
49
Tutorial 2: Purchase Order Process
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 8: Create and Configure the External
Port.
• You must log on as a member of the BizTalk Server Administrators group.
50
Tutorial 2: Purchase Order Process
Note
When you
connect a shape
to a right-side
port, the handle
jumps to the right
side of the
shape.
Note
You saved your work. You can safely close Visual Studio 2005 at this time, or you
can go to Lesson 5: Deploy and Test the Solution.
Next Steps
You build and deploy the B2BSchemas and B2BOrchestrations projects in Lesson 5: Deploy and
Test the Solution.
See Also
Lesson 4: Design the Purchase Order Process
Step 1: Add an Orchestration to the Solution
Step 2: Add a Reference to the B2BSchemas Project
Step 3: Create the Purchase Order Process
Step 4: Create the Message Instance Variables
Step 5: Configure the Message Assignment Shape
Step 6: Configure the Transform Shape
Step 7: Create and Configure the Internal Ports
Step 8: Create and Configure the External Port
51
Tutorial 2: Purchase Order Process
In This Section
• Step 1: Build and Deploy the Solution
• Step 2: Configure and Start the Application
• Step 3: Test the Solution
Note
If you find this confusing, there is no need to be concerned. Visual Studio will tell you the
order in which you must build and deploy your projects. Just right-click a project, and then
click Project Build Order. The Project Dependencies dialog box shows you the build
order for your projects and, on the Dependencies tab, shows the dependency
relationship between the projects.
In the B2BOrchestrations project, you added a reference to the B2BSchemas project in Step 2:
Add a Reference to the B2BSchemas Project. This is because in the B2BSolution solution, the
B2BOrchestrations project references schemas in the B2BSchemas project.
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Lesson 4: Design the Purchase Order Process.
• You must log on as a member of the BizTalk Server Administrators group.
52
Tutorial 2: Purchase Order Process
5. In the B2BOrchestrations Property Pages dialog box, in the tree control, expand
Common Properties, and then click Assembly.
6. On the Assembly page, click the Assembly Key File ellipsis […].
7. In the Assembly Key File dialog box, do the following:
Note
You created the Tutorial.snk
strong name key file in Step 4:
Create a Strong Name Key
File.
8. Click Open.
9. In the B2BOrchestrations Properties Pages dialog box, in the tree control, expand
Configuration Properties, and then click Deployment.
10. On the Deployment page, do the following:
Note
You must wait until the build process completes before you start the deploy
process for the B2BSolution project.
Note
If you build the projects individually, you would build B2BSchemas first. If you
build projects in the wrong order, the process fails.
5. In Solution Explorer, right-click B2BSolution, and then click Deploy Solution.
53
Tutorial 2: Purchase Order Process
Note
If you deploy the projects individually, you would deploy B2BSchemas first. If you
deploy projects in the wrong order, the process fails.
Note
You can safely close Visual Studio 2005 at this time, or you can start Step 2:
Configure and Start the Application.
Next Steps
You bind, enlist, and start the B2BProcess orchestration so that the orchestration can start
processing messages in Step 2: Configure and Start the Application.
See Also
Lesson 5: Deploy and Test the Solution
Step 2: Configure and Start the Application
Step 3: Test the Solution
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 1: Build and Deploy the Solution.
• You must log on as a member of the BizTalk Server Administrators group.
54
Tutorial 2: Purchase Order Process
3. In the Configure Application dialog box, on the B2BProcess tab, do the following:
4. In the ReceivePort1 - Receive Port Properties dialog box, on the General tab, in the
Name box, type ReceivePO_ReceivePort.
5. In the ReceivePort1 - Receive Port Properties dialog box, on the Receive Location
tab, click New.
6. In the ReceiveLocation1 -- Receive Location Properties dialog box, do the following:
7. Click Configure.
8. In the FILE Transport Properties dialog box, in the Receive folder box, type
C:\Tutorial\Filedrop\ReceivePO\, and then click OK.
9. In the ReceivePO_ReceiveLocation -- Receive Location Properties dialog box, from
the Receive pipeline drop-down list, select XMLReceive, and then click OK.
10. In the ReceivePO_ReceivePort - Receive Port Properties dialog box, click OK.
11. In the Configure Application dialog box, on the B2BProcess tab, in the
SendPOConfirmed_Port row, from the Send Ports/Send Port Groups drop-down list,
select <New send port>.
12. In the SendPort1 - Send Port Properties dialog box, on the General tab, do the
following:
55
Tutorial 2: Purchase Order Process
Next Steps
You test the B2B solution in Step 3: Test the Solution.
56
Tutorial 2: Purchase Order Process
See Also
Lesson 5: Deploy and Test the Solution
Step 1: Build and Deploy the Solution
Step 3: Test the Solution
Prerequisites
Note the following requirements before you begin this step:
• Before you begin this step you must complete Step 2: Configure and Start the Application.
• You must log on as a member of the BizTalk Server Administrators group.
Important
Do not move the file because BizTalk Server processes it, and then removes it
from the \ReceivePO directory.
The purchase orders should be routed to C:\Tutorial\Filedrop\FileArchive.
2. Browse to C:\Tutorial\Filedrop\FileArchive to verify that the purchase order was routed
correctly.
You should have a PO{GUID}.xml message and a Confirmed{GUID}.xml message in the
C:\Tutorial\Filedrop\FileArchive directory.
3. Open the .xml files to verify the data contained in each.
Next Steps
You have completed Tutorial 2 by creating, building, deploying, and starting the purchase order
process. You add an invoice and payment process to the B2BProcess orchestration and
57
Tutorial 2: Purchase Order Process
configure the orchestration to exchange messages with the partner Web service in Tutorial 3:
Invoice and Payment Process,.
See Also
Lesson 5: Deploy and Test the Solution
Step 1: Build and Deploy the Solution
Step 2: Configure and Start the Application
----------------------------------------------------------------------------------------------
Information in this document, including URL and other Internet Web site references, is
subject to change without notice. Unless otherwise noted, the companies, organizations,
products, domain names, e-mail addresses, logos, people, places, and events depicted in
examples herein are fictitious. No association with any real company, organization,
product, domain name, e-mail address, logo, person, place, or event is intended or should
be inferred. Complying with all applicable copyright laws is the responsibility of the user.
Without limiting the rights under copyright, no part of this document may be reproduced,
stored in or introduced into a retrieval system, or transmitted in any form or by any
means (electronic, mechanical, photocopying, recording, or otherwise), or for any
purpose, without the express written permission of Microsoft Corporation.
58