0% found this document useful (0 votes)
51 views

BizTalk Server 2004 Lab Manual

This document provides instructions for a lab on enabling message routing in BizTalk Server 2004. The objectives are to create a receive port and location, create send ports with message filters, and test the configuration. The scenario involves routing customer orders to a supplier if the order amount is below $500, and internally if above $500. The steps create a receive port and location to accept files, then two send ports - one to immediately forward low-value orders to the supplier, and one to route higher-value orders for internal approval.

Uploaded by

Maks
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

BizTalk Server 2004 Lab Manual

This document provides instructions for a lab on enabling message routing in BizTalk Server 2004. The objectives are to create a receive port and location, create send ports with message filters, and test the configuration. The scenario involves routing customer orders to a supplier if the order amount is below $500, and internally if above $500. The steps create a receive port and location to accept files, then two send ports - one to immediately forward low-value orders to the supplier, and one to route higher-value orders for internal approval.

Uploaded by

Maks
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

2 Table of Contents

Table of Contents

Microsoft BizTalk Server 2004: Enabling Message Routing................................................................... 3


Exercise 1 Create a Receive Port and a Receive Location ..................................................................................4
Exercise 2 Create Send Ports and Define Message Filters ..................................................................................6
Exercise 3 Start the Send Ports and Test the Configuration ................................................................................7
Microsoft BizTalk Server 2004: Enabling Message Routing 3

Microsoft BizTalk Server 2004:


Enabling Message Routing

Objectives After completing this lab, you will be able to:


„ Create a receive port and a receive location.
„ Create send ports and define message filters.
„ Start the send ports, enable the receive location, and test the configuration.

Scenario At times, you may receive certain types of messages that do not require any
detailed processing. Message routing provides a solution for forwarding
messages to a specific send port, based solely on the contents of the message.
Northwind Traders wants to immediately route customer orders to its supplier,
Fabrikam, when the order amount is equal to or less than $500. Orders greater
than $500 require additional approval, and should be routed internally for
additional processing.

Receive
Receive Port
Port
1 (rprtReceive)
(rprtReceive)
Receive
Receive Location
Location
(rlocReceiveFILE)
(rlocReceiveFILE)

MessageBox
Map
Map
2
NWCustomerOrder To Subscriptions
FKSupplierPO.btm

3 4
Order > 500 Order <= 500

Send Port
Port Send Port
Port
Estimated time to (sprtPONeedsApproval)
(sprtPONeedsApproval) (sprtPOSendOrderFILE)
(sprtPOSendOrderFILE)
complete this lab: 30 Filter: Filter:
minutes >500 Bind/Enlist <=500

In this lab you will learn how to create both receive locations and send ports.
You will also learn how to use message routing to create a subscription for a
send port. In this example, you create a filter that checks the quantity, and then
either forwards the message to one send port if the value is equal to or less than
500, or to another send port if the value is greater than 500.
4 Microsoft BizTalk Server 2004: Enabling Message Routing

Exercise 1
Create a Receive Port and a Receive Location

Scenario
In this exercise, you will open and modify an existing solution and create a receive port and a
receive location for incoming messages.

Tasks Detailed steps

1. Set up lab. a. Click Start | Windows Explorer and navigate to C:\Labs\Setup


Scripts\SetupLab4.A.bat.
b. Double-click the file to run it and minimize. Windows Explorer.
This script will erase the existing projects and artifacts in the
C:\Labs\Work folder and copy all required artifacts and files for this lab
into the C:\Labs\Work folder.
2. Open an existing solution. 3. Click Start | All Programs | Microsoft Visual Studio .NET 2003 |
Microsoft Visual Studio .NET 2003.
This opens a predefined c. On the File menu in Visual Studio, click Open Solution.
project that contains
schemas (.xsd) and a map d. In the Open Solution dialog box, navigate to
file (.btm). C:\Labs\Work\NWBusinessSolution, select
NWBusinessSolution.sln, and then click Open.
A predefined project opens in the Solution Explorer.
4. Build and deploy the a. In the Solution Explorer, right-click NWMessaging, and then click
project. Build.
b. Right-click NWMessaging, and then click Deploy.
This installs the classes contained in the assemblies in the BizTalk
Database and adds the assembly to the GAC.
5. Create a receive port. a. On the View menu, click BizTalk Explorer.
b. Right-click BizTalk Configuration Database, and then click Refresh.
This creates a receive port
for incoming messages and c. Expand the DEMOAPPSERVER.BizTalkMgmtDb.dbo node.
instructs BizTalk Server to d. Right-click Receive Ports, and then select Add Receive Port.
use the e. Ensure that One-Way Port is selected in the drop-down menu and
NWCustomerOrder_To_ click OK.
FKSupplierPO map to f. Configure the Port using the following information:
transform any message
where the message’s schema Parameter Value
matches the source schema Name rprtReceive
of the map. Inbound Maps NWMessaging.NWCustomerOrder_To_
FKSupplierPO…

Note: In Inbound Maps under Map to apply, you will have to click the
scroll down arrow to view the appropriate map value.
g. Click OK.
6. Create a receive location. a. Right-click Receive Locations under rprtReceive, and then select
Add Receive Location.
Microsoft BizTalk Server 2004: Enabling Message Routing 5

location provides the b. Use the following information for the receive location:
physical address and
transport information for Parameter Value
Name rlocReceiveFILE
BizTalk Server to process
Transport Type FILE
inbound messages. Address URI…Receive Folder C:\Labs\Work\FileDrop\Messaging\Receive
Address URI…File Mask *.xml
Receive Handler BizTalkServerApplication
ReceivePipeline Microsoft.BizTalk.DefaultPipelines.XML
Receive…

c. Click OK.
6 Microsoft BizTalk Server 2004: Enabling Message Routing

Exercise 2
Create Send Ports and Define Message Filters

Scenario
In this exercise, you will create two send ports and define a filter for routing messages to a specific
send port, based on the message contents. Outgoing customer orders with a total amount equal to or
less than $500 will be sent to a send port that forwards the message immediately to the supplier.
Customer orders with amounts greater than $500 require internal approval, and will be sent to a
different send port for further processing..

Tasks Detailed steps

1. Create the first send port. d. In BizTalk Explorer, right-click Send Ports, and then select Add
Send Port.
This creates a file folder e. In the drop-down menu ensure that Static One-Way Port is selected
location to send the message and click OK.
to if the amount is less than
or equal to 500. f. Define the Port using the following information:

Parameter Value
Name sprtPOSendOrderFILE
Transport Type FILE
Address URI…Destination Folder C:\Labs\Work\FileDrop\Messaging\SendOr
der
Address URI…File Name PurchaseOrder%MessageID%.xml
Send | Send Pipeline Microsoft.BizTalk.DefaultPipelines.XML
Transmit
Filters & Maps | Filters | Property NWMessaging.TotalOrderAmount
Filters | Operation <=
Filters | Value 500
g. Click OK.
2. Create the second send port. a. Right-click Send Ports, and then select Add Send Port.
b. Create a Static One-Way Port by using the following information:
This creates a file folder
location to send the message Parameter Value
to if the amount is greater Name sprtPONeedsApprovalFILE
Transport Type FILE
than 500. Address URI…Destination Folder C:\Labs\Work\FileDrop\Messaging\NeedsAppro
val
Address URI…File Name PurchaseOrder%MessageID%.xml
Send Pipeline …XML Transmit
Filters & Maps | Filters | Property NWMessaging.TotalOrderAmount
Filters | Operation >
Filters | Value 500
c. Click OK.
Microsoft BizTalk Server 2004: Enabling Message Routing 7

Exercise 3
Start the Send Ports and Test the Configuration

Scenario
In this exercise, you will start the send ports, enable the receive locations, and then test the scenario.

Tasks Detailed steps

3. Start the newly created send a. Right-click sprtPOSendOrderFILE, and then select Start.
ports. b. Right-click sprtPONeedApprovalFILE, and then select Start.

Ports must be started in


order to process messages.
Starting the port implies
enlisting the port. Enlisting
a send port creates one or
more subscriptions for it.
4. Enable the receive location. a. Right-click rlocReceiveFILE, and then select Enable.

Enabling the receive


location allows BizTalk
Server to start processing
messages at that location.
5. Test the scenario. a. In Windows Explorer, browse to
C:\Labs\Work\FileDrop\Messaging.
The receive port might take b. Right-click CustomerOrder1.xml and select Open with | Notepad.
a minute to activate and
process the first document, Verify that the TotalOrderAmount is less than 500.
the first time you enable the c. Close Notepad.
location. d. Copy and then paste CustomerOrder1.xml to
C:\Labs\Work\FileDrop\Messaging\Receive.
You may want to open the
CustomerOrder1.xml and Do not move the file, because BizTalk Server processes it and then removes
CustomerOrder2.xml files it from the …\Receive folder.
before moving them, to see e. Browse to C:\Labs\Work\FileDrop\Messaging\SendOrder, to verify
the total order amount. that the order was routed correctly.
Because the amount in less than 500, the order is dropped into the
…\SendOrder folder.
f. In Windows Explorer, browse to
C:\Labs\Work\FileDrop\Messaging.
g. Right-click CustomerOrder2.xml and select Open with | Notepad.
Verify that the TotalOrderAmount is greater than 500.
h. Close Notepad.
i. Copy and then paste CustomerOrder2.xml to
C:\Labs\Work\FileDrop\Messaging\Receive.
j. Browse to C:\Labs\Work\FileDrop\Messaging\NeedsApproval to
verify that the order was routed correctly.
8 Microsoft BizTalk Server 2004: Enabling Message Routing

Because the amount is greater than 500, the order is dropped in the
...\NeedsApproval folder.
k. Close Windows Explorer.

You might also like