Book Image

SOA Patterns with BizTalk Server 2009

By : Richard Seroter
Book Image

SOA Patterns with BizTalk Server 2009

By: Richard Seroter

Overview of this book

SOA is about architecture, not products and SOA enables you to create better business processes faster than ever. While BizTalk Server 2009 is a powerful tool, by itself it cannot deliver long-lasting, agile solutions unless we actively apply tried and tested service-oriented principles. The current BizTalk Server books are all for the 2006 version and none of them specifically looks at how to map service-oriented principles and patterns to the BizTalk product. That's where this book fits in. In this book, we specifically investigate how to design and build service-oriented solutions using BizTalk Server 2009 as the host platform. This book extends your existing BizTalk knowledge to apply service-oriented thinking to classic BizTalk scenarios. We look at how to build the most reusable, flexible, and loosely-coupled solutions possible in the BizTalk environment. Along the way, we dive deeply into BizTalk Server's integration with Windows Communication Foundation, and see how to take advantage of the latest updates to the Microsoft platform. Chock full of dozens of demonstrations, this book walks through design considerations, development options, and strategies for maintaining production solutions.
Table of Contents (18 chapters)
SOA Patterns with BizTalk Server 2009
Credits
About the author
About the reviewers
Preface
Index

What are BizTalk maps?


Rarely does data emitted from one system match the structure and content expected by another system. Hence, some sort of capability is needed to translate data so that it can be digested by a variety of consumers. Extensible Stylesheet Language Transformations (XSLT) is the industry standard for reshaping XML documents and the BizTalk Mapper is the tool used by BizTalk developers to graphically build XSLTs.

When creating a map, the BizTalk Mapper uses a straightforward design paradigm where the source schema is identified on the left side and the destination schema resides on the right side of the tool.

We are often lucky enough to be able to make direct connections between nodes. For instance, even though the node names are different, it is very easy to drag a link between a source node named FName and a destination node named FirstName. However, frequently you are required to generate new data in a destination schema that requires reformatting or reshaping the source data. This is where BizTalk Mapper functoids come to the rescue. What in the world is a functoid? Well, it is a small component which executes data manipulation functions and calculations on source nodes in order to meet the needs of the destination schema. There are over 75 functoids available in the BizTalk Mapper, which span a variety of categories such as string manipulation, mathematical calculations, logical conditions, and cumulative computation.

If you don't see exactly what you're looking for, you can use the Scripting functoid which enables you to write your own XSL script or .NET code to be executed within the map.

It's important to understand that the BizTalk Mapper is for data normalization logic only, NOT business logic. If you need to make business decisions, a map is not the right place to store that logic. For example, you would not want to embed complex discount generation logic within a BizTalk map. That sort of business logic belongs in a more easily maintained repository than in a map file. As a simple rule, the map should only be responsible for shaping the output message, not for altering the meaning of the data in its fields. Maps are great for transformation instructions, but a lousy place to store mission-critical business algorithms.