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

Working with BizTalk orchestration


BizTalk Server includes a workflow platform, which allows us to graphically create executable, long-running, stateful processes. These workflows, called orchestrations, are designed in Visual Studio.NET and executed on the BizTalk Server. The Orchestration Designer in Visual Studio.NET includes a rich palette of shapes we can use to build robust workflows consisting of control flow, message manipulation, service consumption, and much more. The Orchestration Runtime is responsible for executing the orchestrations and managing their state data.

Orchestration is a purely optional part of a BizTalk solution. You can design a complete application that consists solely of message routing ports. In fact, many of the service-oriented patterns that we visit throughout this book will not require an orchestration. That said, there are a number of scenarios where injecting orchestrations into the solution makes sense. For instance, instead of subscribing directly to the "new employee" message, perhaps a payroll system will need additional data (such as bank information for a direct deposit) not currently available in the original employee message. We could decide to create a workflow, which first inserts the available information into the payroll system, and then sends a message to the new employee asking for additional data points. The workflow would then wait for and process the employee's response and conclude by updating the record in the payroll system with the new information. BizTalk orchestrations are a good fit for automating manual processes, or choreographing a series of disconnected services or processes to form a single workflow.

Orchestration "shapes" such as Decide, Transform, Send, Receive, and Loop are used to build our orchestration diagrams like the one below. This particular diagram below shows a message leaving the orchestration, and then another message returning later on in the flow. How does that message know which running orchestration instance to come back to? What if we have a thousand of these individual processes in flight at a single point in time? BizTalk Server has the concept of correlation which means that you can identify a unique set of attributes for a given message which will help it find its way to the appropriate running orchestration instance. A correlation attribute might be as simple as a unique invoice identifier, or a composite key made up of a person's name, order date, and zip code.

Orchestration is a powerful tool in your development arsenal and we will make frequent use of it throughout this book.