SIGN UP MEMBER LOGIN:    
ARTICLE

Receiving Messages With Multiple Schemas in a Single Orchestration

Posted by John Charles Olamendy Articles | BizTalk Server September 18, 2009
In this article, I will cover how to receive two messages with different schemas in a single orchestration in order to process them instead of creating separate orchestrations for each message with identical business logic. For the solution, I will use the Listen shape along with two Receive shapes each of them listening for different messages.
Reader Level:

Introduction

In this article, I will cover how to receive two messages with different schema in a single orchestration in order to process them instead of creating separate orchestrations for each message with identical business logic. For the solution, I will use the Listen shape along with two Receive shapes each of them listening for different messages.

Getting started with the solution

First of all, open Visual Studio .NET and create a solution and an Empty BizTalk Server project (see Figure 1).

image1.gif

Figure 1

Now let's create two different schemas for the messages, for example, schemas representing similar business entities such as customers but with different semantic representation. The first schema represents documents from one ERP system (see Figure 2).

image2.gif

Figure 2

The second schema represents documents from other ERP system, and it differs semantically from the first one in that the full name of customer is in one data item (full name) instead of two data items (first name and last name) (see Figure 3).

image3.gif

Figure 3

Now let's add an orchestration artifact into the project and define the underlying business logic (see Figure 4).

image4.gif

Figure 4

Drag and drop a Listen shape from the Toolbox onto the design surface in the orchestration and set a descriptive name. Then add two Receive shapes within the Listen shape. Set the Activate property to true and rename both Receive shapes. And finally, add two Send shapes and rename them. The final orchestration resembles the Figure 5.

image5.gif

Figure 5

Create two message variables in the orchestration by right-clicking the Messages node, and selecting New Message on the Orchestration View window. Rename them appropriately as msgCustomerERP1 and msgCustomerERP2. Set the type to previously define schemas (see Figure 6 and Figure 7).

image6.gif

Figure 6

image7.gif

Figure 7

Set the Message property of the Receive_ERP1 and Send_ERP1 to msgCustomerERP1 and the Message property of the Receive_ERP2 and Send_ERP2 to msgCustomerERP2.

Finally, add and configure two ports for the Receive shapes and two ports for the Send ports. Then connect each shape for the underlying port (see Figure 8).

image8.gif

Figure 8

Now you can assign a key name file to the project (see Figure 9), set an application name (see Figure 10), and deploy it to the server in order to be tested.

image9.gif

Figure 9

image10.gif

Figure 10

Conclusion

In this article, I covered how to receive two messages with different schemas in a single orchestration. Now you can apply this solution to your own business scenario.

Login to add your contents and source code to this article
share this article :
post comment
 
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Gauge for SharePoint
Become a Sponsor