Click here to Skip to main content
14,485,669 members

BizTalk Enterprise Integration Patterns - Part 1

Rate this:
3.40 (6 votes)
Please Sign up or sign in to vote.
3.40 (6 votes)
25 Apr 2006CPOL
This article explains the Content Enricher pattern of Message Oriented Systems for BizTalk Server 2004.


This article is the first part of the BizTalk Integration pattern series. This article discusses about a simple message oriented systems pattern known as Content Enricher Pattern.

Content Enricher pattern - Setting the context...

In message oriented systems, when a message is sent from a source to the destination, it is common that the destination system requires some additional information in order to process the message correctly. The message received by the destination would contain certain "keys" or identifiers, which can be used to obtain this additional information.

  • The message received by the destination is known as the "Basic Message".
  • The processed message is known as the "Enriched Message".

This pattern discusses about getting that additional information and creating the "Enriched Message".


Content Enricher

The Content Enricher uses information inside the incoming message (e.g., key fields) to retrieve data from an external source. After the Content Enricher retrieves the required data from the resource, it appends the data to the message. The original information from the incoming message may be carried over into the resulting message, or may no longer be needed, depending on the specific needs of the receiving application.

Scenario - A Purchase Order request for a Part

Consider a scenario where a Purchase Order request is made for a Part. The Order message would have the fields PartNo and QuantityRequired filled up. The Order schema would look like this...


Note: The Order XML incoming message will have only the fields PartNo and QuantityRequired filled up.

The Enricher Pattern implemented as an Orchestration


A Purchase Order request message is received by the "Receive Shape". Next, a WebRequest message is prepared and a request is sent.

The "Enricher" in this case is a "Web Service", which takes in PartNo and returns all the additional information required by the Orchestration.

Note: The WSPartStore port is the "Enricher" in our example. This is the external data source which provides additional information about the message.

The Web Service request has only the PartNo filled up.


The data received from the Web Service would be used to populate the message, thus "Enriching" the message.


Executing the demo

Input file


The input XML file would have only the PartNo and QuantityRequired filled up.

Output file


The output file shall have all the fields filled up.

About the downloadable code

  • Unzip the Web Service with the folder names into the C:\inetput\wwwroot directory and setup the Web Service.
  • Unzip the BizTalk project zip file with the folder names in the C:\ drive.
  • The folder KeyAndBindings contains the Bindings.xml file, which can be imported after the solution is built and deployed.
  • Place the OrderMessage in the In folder and check the Out folder.

Some takeaways

  1. Always select the "WebPortType" created when the "Web Reference" is added to the project while creating "Web Ports" in the Orchestration.
  2. Additional routing logic needs to be written if you would like to send the message to a different port after the Message is populated.

Additional references...

  1. The Architecture Journal - Messaging Patterns in Service Oriented Architecture, Part 2
  2. Enterprise Integration Patterns


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Naveen Karamchetti
Architect AT&T Wi-Fi Services
United States United States
Naveen has done his Masters (M.S.) in Computer science, has started his career programming the mainframes and now has more than a decade of programming, development and design experience. Naveen has a sharp eye and keen observation skills. Naveen has worked for several companies and strived hard to build large scale business applications and bringing better solutions to the table.
Quite recently Naveen has built a fairly complex integration platform for a large bank. His hobbies include training, mentoring and research. Naveen spends his free time visiting National Parks nationwide.

Naveen has developed the BizTalk Control Center (BCC)

Comments and Discussions

-- There are no messages in this forum --
Posted 24 Mar 2006


23 bookmarked