Lab 7B: Working With Orchestration Shapes: Objectives
Lab 7B: Working With Orchestration Shapes: Objectives
Scenario In this lab, you will use BizTalk Orchestration Designer to define the business
process for Northwind Traders’ order fulfillment business scenario.
CustomerOrder1.xml
Siebel
Receive
Receive Port
Port Order
Order Fulfillment
Fulfillment File Drop
Orchestration
Orchestration
Receive
Receive Location
Location (OrderFulfillment.odx)
(OrderFulfillment.odx)
(File
(File Drop)
Drop)
Test
Orchestration
Distribution System
File Drop
Estimated time to First, you will add the required schemas and maps to the existing messaging
complete this lab: project. Then you will create a new project for the orchestration, and create and
60 minutes configure the required shapes to represent the actions in the business process.
Finally, you will build, deploy, and start the orchestration, and test the
application.
2 Lab 7B: Working with Orchestration Shapes
Exercise 1
Adding Schemas and Maps to the Messaging Project
The exercises in this orchestration lab require several schemas and maps. In this exercise you will
add schemas and maps to the existing NWMessaging project.
2. Build and deploy the a. In Solution Explorer, right-click NWMessaging, and then click Build.
project. b. Right-click NWMessaging, and then click Deploy.
Exercise 2
Building an Orchestration
In this exercise, you use Orchestration Designer to build upon the orchestration you created in the
previous lab to represent the Northwind Traders business process. Using Orchestration Designer,
you will select the orchestration shapes required to represent actions for this business process. In
later exercises, you will provide additional information to configure the shapes so that they function
properly.
(continued)
6. Create a correlation set. a. In the Orchestration View, right-click Correlation Sets, click New
Correlation Set, and then configure the following property:
This correlation set provides
a variable to hold the actual Identifer Correlation Type
DistCorr NWBusinessProcesses.DistCorrType
values described in the
correlation type. It is
possible to have multiple Your finished Orchestration View window should look like this:
sets based on one type.
Lab 7B: Working with Orchestration Shapes 5
(continued)
7. Configure parallel actions. a. If the Toolbox is not docked on the left side, then on the View menu,
click Toolbox.
The Parallel Actions shape b. In the Toolbox, click BizTalk Orchestrations to display the shapes
allows multiple threads to available for creating an orchestration.
run different parts of the
business process c. Drag a Parallel Action shape to the top of the Orchestration
simultaneously. Designer (just under the green Start icon).
d. Right-click the Parallel Actions shape, click Properties Window, and
Here we are sending change the Name property to Do Updates.
messages to SAP, Siebel, e. Right-click the Parallel Actions shape, and then click New Parallel
and our distribution system Branch.
all at the same time. Before
The Parallel Actions shape should now have three branches.
we send out the message to
the distribution system, we f. Drag the existing SAPUpdate construct shape to the first branch (left
are setting the value to side) of the Parallel Actions shape.
correlate on when the g. Select the SAPUpdate construct shape and reset the MapName
message returns. property.
h. Drag the Send SAP Update Send shape to the first branch just below
Remember that if we had
the SAPUpdate Construct shape.
changed the same variable
in two or more parallel i. Drag the existing oprtSAPOrderCreationSend port in the right Port
paths, we would need to set Surface to the left Port Surface, next to the Send SAP Update Send
a surrounding scope as shape.
synchronous. j. Drag a Send shape directly under the second parallel branch, and the
configure the shape with the following properties:
Property Value
Initializing Correlation DistCorr
Message CustOrder
Name Update Distribution
k. Drag a Send shape directly under the third parallel branch, and the
configure the shape with the following properties:
Property Value
Message SiebelAccountUpdate
Name Send Siebel Update
Property Value
Following Correlation Sets DistCorr
Message DistSysResp
Name Distribution Status
6 Lab 7B: Working with Orchestration Shapes
(continued)
7. (continued) m. Drag a Construct Message shape to the third parallel branch, and then
configure the following properties:
Property Value
Messages Constructed SiebelAccountUpdate
Name Construct SiebelAccountUpdate
(continued)
9. Add final orchestration a. Drag a Send shape to directly under the Do Updates shape (just above
shapes. the red stop icon), and then configure the following properties:
Property Value
After all of the parallel Message CustOrder
actions complete their tasks, Name Send To Supplier
a message is sent to order
materials from Northwind b. Drag a Construct Message shape to below the Send To Supplier
Traders’ suppliers, and shape, and then configure the following properties:
another message is placed in
Property Value
a file to help indicate a Message Constructed CustOrderFulfillmentResp
successful orchestration Name ConstructResponse
completion during the lab.
c. Drag a Message Assignment shape, drop it inside of the Construct
shape, and then configure the following properties:
Property Value
Expression CustOrderFulfillmentResp = CustOrder;
CustOrderFulfillmentResp.Status = "Fulfilled";
CustOrderFulfillmentResp.Comments = "Order is Fulfilled.";
Name Set Status
(continued)
10. Create send ports. a. Right-click anywhere on the Port Surface (left side), click
New Configured Port, and then create a send port by using the
following information:
This creates the logical send
ports for all of our messages Parameter Value
into and out of the Name oprtOrderFulfillPubSend
orchestration. The Specify Create… Port Type Name oprtOrderFulfillPubTypeSend
Communication Pattern One-Way
Later setting indicates that Access Restrictions Internal
the binding of the logical Port direction of communication ...Sending…
orchestration ports to Port binding Specify Later
physical locations will occur
b. Repeat the previous step to create additional send ports by using the
later in BizTalk Explorer.
following information:
Port Surface Port Name Port Type Name
Right side oprtDistReqSend oprtDistReqTypeSend
Right side oprtSiebelAccountUpdateSend oprtSiebelAccountUpdateTypeSend
Right side oprtToSupplierSend oprtToSupplierTypeSend
11. Add a map to an existing a. In BizTalk Explorer, right-click BizTalk Configuration Database and
send port. select Refresh.
b. Expand Send Ports.
The message needs to be
transformed for Fabrikam. c. Right-click sprtFabrikamSendHTTP, select Edit, and then modify
the following port properties:
Parameter Value
Outbound Maps NWCustomerOrder_To_FKSupplierPO
12. Create a receive port. a. Right-click anywhere on the Port Surface (right side), click
New Configured Port, and then create a receive port by using the
After the batch process following information:
DistributionUI finishes, the
response will come back Parameter Value
through the Name oprtDistRespReceive
oprtDistRespReceive port Create… Port Type Name oprtDistRespTypeReceive
Communication Pattern One-Way
by using the following Access Restrictions Internal
correlation set. Port direction of communication ...Receiving…
Port binding Specify Later
Lab 7B: Working with Orchestration Shapes 9
(continued)
13. Connect orchestration a. Drag connections between the orchestration Send and Receive shapes
shapes to orchestration and their corresponding send and receive ports as shown in the table:
ports.
Shape Port
This indicates which steps Publish OrderFulfillment oprtOrderFulfillPubSend
are connected to which Update Distribution oprtDistReqSend
Distribution Status oprtDistRespReceive
logical ports. The UI will
Send Siebel Update oprtSiebelAccountUpdateSend
not permit you to connect Send To Supplier oprtToSupplierSend
mismatching port
types/directions. Your completed orchestration should look like this:
10 Lab 7B: Working with Orchestration Shapes
Exercise 3
Building and Deploying the Orchestration Project
In this exercise, you will build the project to generate an assembly that contains the resources (the
orchestration) that you just created. This also ensures that that there are no compile time errors in
the work you have completed so far. You will then deploy the orchestration.
1. Build and deploy the a. On the File menu, click Save All.
orchestration Project b. In Solution Explorer, right-click NWBusinessProcesses, and then click
Build.
c. Right-click NWBusinessProcesses, and then click Deploy.
The project is compiled and is displayed under Assemblies in
BizTalk Explorer (You may have to refresh the database view).
Lab 7B: Working with Orchestration Shapes 11
Exercise 4
Starting and Testing the Orchestration
In this exercise, you will start the BizTalk runtime process on the server. You will then enlist the
service in order to associate the business process that you designed in the orchestration with the
physical environment in which the orchestration will run. Finally, you will start the processing of
the orchestration, so that you can test your application.
(continued)
3. Run the scenario. a. In Windows® Explorer, browse to C:\Labs\TestTools, and then run
the SetupTestHarnessproject1.bat to install a setup orchestration
This is to test the project.
orchestration process and b. Use Windows Explorer to copy
business policy execution. C:\Labs\Work\FileDrop\Messaging\CustomerOrder1.xml to
C:\Labs\Work\FileDrop\Messaging\Receive.
Do not move the file, because BizTalk Server processes it and
then removes it from the \Receive directory.
At this point you may verifty that there are outputs created in
C:\labs\work\filedrop\Northwind\LOBOutput for both the SAP
and Siebel systems. Also note that a file has been dropped into
C:\Labs\Work\FileDrop\Northwind\Input and is ready to be
picked up by the batch distribution system.
c. Browse to C:\Labs\TestTools, and then run DistributionUI.exe.
d. Click Submit Batch.
e. Browse to C:\Labs\Work\Filedrop\Messaging\OrchOutbound, to
verify that the message was processed.
Wait for a supplier service pop-up window to confirm that the
supplier has received the purchase order.
Verify that a file has been written to
C:\Labs\Work\FileDrop\Northwind\Fulfillment
once the process is complete.
f. In Event Viewer view the Application Log for any errors.