0% found this document useful (0 votes)
166 views12 pages

Lab 7B: Working With Orchestration Shapes: Objectives

Lab 7b: Working with Orchestration Shapes teaches you how to build and deploy orchestrations. In this lab, you will define the business process for Northwind Traders' order fulfillment business scenario. You will add schemas and maps to an existing project, then create a new project for the orchestration. Finally, you will build, deploy, and start the orchestration, and test the application.

Uploaded by

api-3747450
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views12 pages

Lab 7B: Working With Orchestration Shapes: Objectives

Lab 7b: Working with Orchestration Shapes teaches you how to build and deploy orchestrations. In this lab, you will define the business process for Northwind Traders' order fulfillment business scenario. You will add schemas and maps to an existing project, then create a new project for the orchestration. Finally, you will build, deploy, and start the orchestration, and test the application.

Uploaded by

api-3747450
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Lab 7B: Working with Orchestration Shapes

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


! Add schemas and maps to an existing project.
! Create a BizTalk® orchestration.
! Build and deploy the orchestration project.
! Start and test the orchestration.

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)

File Drop SAP


Test
Test Harness
Harness
(SetupTestHarnessProject1.bat)
(SetupTestHarnessProject1.bat)

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.

Tasks Detailed steps

1. Add existing schemas and a. Open C:\Labs\Work\NWBusinessSolution\NWBusinessSolution.sln


maps to the project. (if it is not already opened).
b. In Solution Explorer, right-click NWMessaging, point to Add, and
These schemas and maps then select Add Existing Item.
will be used for the
distribution system, SAP, c. Navigate to C:\Labs\Work, and then add the following schemas and
and Siebel. maps (to select multiple items, hold down the CTRL key while you
click):
• DisResp.xsd
• OrderResponse.xsd
• SiebelAccountUpdate.xsd
• NWCustomerOrder_To_SiebelAccountUpdate.btm

The schemas and maps are added to Solution Explorer.

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.

The assembly must be


deployed before items in it
can be referenced by send
and receive ports.
Lab 7B: Working with Orchestration Shapes 3

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.

Tasks Detailed steps

1. Open the existing a. In Solution Explorer, under NWBusinessProcesses, open the


orchestration. NWOrderFulfillment.odx orchestration.
2. Remove the send port and a. On the left Port Surface, right-click oprtSAPReceive, and then click
the receive shape. Delete.
b. Delete the Receive Customer Order receive shape.
3. Create orchestration a. In the Orchestration View, delete the CustomerOrder message
parameters. variable.
b. In the Orchestration View, right-click Orchestration Parameters,
This orchestration will be click New Message Parameter, and then create the following
started from another parameters:
orchestration. The
orchestration parameters Direction Identifer Message Type
provide a way of sending in In CustOrder Schemas…NWMessaging.CustomerOrder
the first message. In a Out CustOrderFulfillmentResp Schemas…NWMessaging.CustomerOrder
synchronous call (like the
one we will make), the out
parameter provides the
return value.
4. Create orchestration a. In the Orchestration View, right-click Messages, click New Message,
messages. and then create the following messages:
Identifer Message Type
Variables are used to hold DistSysResp Schemas…NWMessaging.DistResp
the XML document
SiebelAccountUpdate Schemas…NWMessaging.SiebelAccountUpdate
instances during the life of
the business process. The
message types are defined
by XSD schemas.
5. Create a correlation type. a. In the Orchestration View (under Types), right-click Correlation
Types, and then click New Correlation Type.
A correlation type is a list of b. In the Correlation Properties dialog box, add
parameters that are used by NWMessaging.CustomerPONumber, and then click OK.
BizTalk Server to relate
returning messages back to c. Change the Identifier to DistCorrType.
their original orchestration
instances.
4 Lab 7B: Working with Orchestration Shapes

(continued)

Tasks Detailed steps

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)

Tasks Detailed steps

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

l. Drag a Receive shape directly under the Update Distribution Send


shape and then configure the following properties:

Property Value
Following Correlation Sets DistCorr
Message DistSysResp
Name Distribution Status
6 Lab 7B: Working with Orchestration Shapes

(continued)

Tasks Detailed steps

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

n. Drag a Transform shape, drop it inside of the Construct shape, and


then configure the following properties:
Property Value
Input Message Existing Map… NWCustomerOrder_To_SiebelAccountUpdate
Source: Variable Name: CustOrder
Destination: Variable Name: SiebelAccountUpdate
Name Siebel Account Transform
8. Add Delay shapes to the a. Drag a Delay shape, and drop it under the Send SAP Update Send
orchestration. shape.
b. Right-click the Delay shape, click Edit Delay…, and then, in the
This solves an issue with the Expression Editor, type: new System.TimeSpan(0,0,0,0);
current release of BizTalk
Server. The Delay shapes c. Click OK to close the Expression Editor.
prevent processes from d. Drag a Delay shape, and drop it under the Send Siebel Update Send
locking when two parallel shape.
actions attempt to access the e. Right-click the Delay shape, click Edit Delay…, and then, in the
LOBOutput file Expression Editor, type: new System.TimeSpan(0,0,0,0);
simultaneously.
f. Click ok to close the Expression Editor.
So far, your orchestration should look like this:

Your orchestration contains several insufficient configuration


Smart Tags. You can click the icon to display additional text
regarding the insufficient configuration. You will resolve these
issues in later exercises, prior to building the project.
Lab 7B: Working with Orchestration Shapes 7

(continued)

Tasks Detailed steps

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

d. Drag a Send shape to directly under the ConstructReponse shape, and


then configure the following properties:
Property Value
Message CustOrderFulfillmentResp
Name Publish Order Fulfillment
Your orchestration should now look like this:
8 Lab 7B: Working with Orchestration Shapes

(continued)

Tasks Detailed steps

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)

Tasks Detailed steps

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.

Tasks Detailed steps

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.

Tasks Detailed steps

1. Start the BizTalk runtime a. Start the BizTalk Administration Console.


process. b. In the left pane, expand Microsoft® BizTalk Server 2004 (Local), and
then expand Hosts.
The runtime process runs
under the context of a c. Click the BizTalkServerApplication to verify that the status of the
BizTalk Server host service is Running.
instance. The host instance If the status remains at Start Pending, right-click the server
defines a security boundary name, and then click Refresh.
for sending, receiving, and
processing messages.
2. Enlisting and starting the a. In BizTalk Explorer, right-click BizTalk Configuration Databases
orchestration. and select Refresh.
b. Expand Orchestrations.
This configures the physical
environment in which your c. Right-click NWBusinessProcesses, and then select Bind.
solution runs to start d. In the Port Bindings dialog box, configure the binding as follows:
processing messages. Here
you connect the logical Ports Binding
oprtDistRespReceive RprtDistributionReceive
orchestration ports with the oprtSAPOrderCreationSend SprtSAPSendFILE
physical ports, because you oprtDistReqSend sprtDistributionSysSendFILE
used the Specify Later oprtSiebelAccountUpdateSend SprtSiebelSendFILE
option when you created the oprtToSupplierSend SprtFabrikamSendHTTP
oprtOrderFulfillPubSend sprtOrderFulfilledSendFILE
physical ports.
e. In the Port Bindings dialog box, configure the host to use
The orchestration will fail if BizTalkServerApplication.
the receive locations have
not been configured f. Right-click NWBusinessProcesses, select Start, and then in the
properly. Express Start dialog box, click OK.
Your solution is now ready for testing.
12 Lab 7B: Working with Orchestration Shapes

(continued)

Tasks Detailed steps

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.

You might also like