Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / operating-systems / Windows

Keep The Orchestration Simple (KTOS) - A BizTalk Pattern

3.29/5 (5 votes)
27 Apr 2006CPOL3 min read 1   235  
This article describes a pattern wherein an Orchestration is independent of the transformation map.

Sample Image - Architecture.png

Introduction - KISS vs. KTOS

If KISS stands for "Keep It Simple Stupid", then KTOS stands for "Keep The Orchestration Simple".

Designing a robust and extensible orchestration is the key to any successful BizTalk implementation. This article describes a simple pattern which frees the Orchestration from a Transform Shape.

Scenario and the problem to be solved

Consider a scenario where a Purchase Order (PO) needs to be processed and a Purchase Order Acknowledgement (POAck) needs to be transmitted. Every incoming PO has a particular format which needs to be transformed into, an internal PO format, in order to be able to process it. Similarly, every outgoing POAck has a different format which needs to suit the receiver. The problem is how to add new incoming PO and outgoing POAck formats to the system once the system is operational.

The BizTalk Solution

The BizTalk Orchestration should abstract itself from any other external schemas. The Orchestration has knowledge of only one schema known as "UniversalPO". All incoming external PO schemas need to be mapped into this UniversalPO, and similarly, all the outgoing POs need to be mapped into appropriate POAcks.

The solution has been divided into three main parts; the PurchaseOrder project is the core of the solution. PO_CompanyA references the PurchaseOrder project, and the two maps are added: one transforms the external PO into Universal_PO and another transforms Univeral_PO into POAck as required by the external system. The Orchestration diagram below presents a better picture.

Main Orchestration

ProcessPO.PNG

This Orchestration processes the PO by calling an external .NET component known as BizRules which is present in the Global Assembly Cache (GAC).

BizRules .NET component

The class diagram for the BizRules.NET component is shown below...

CD.PNG

Send Port configuration

SendPort.PNG

The transformation map specified in the "Send" Port converts "UniversalPO" into "POAck".

Receive Port configuration

ReceivePort.PNG

The transformation map specified in the "Receive" Port converts "PO_A" into "UniversalPO".

Solution Explorer

SolutionExplorer.PNG

Follow these steps to add a new PO format

In order to support a new PO format after the BizTalk solution is deployed, the following needs to be done...

  • Add new external, incoming, and outgoing schemas in a new project.
  • Two maps are required to be added, one for converting the "external PO" into "internal PO", and another for converting the "internal PO" into "POAck" as required by the external system.
  • Add the maps in the new Receive and Send Ports.

Summary

In this article, we have seen how to structure our BizTalk artifacts in order to ensure painless (post-deployment) maintenance of a BizTalk Solution. Generally speaking, being aware of the dependencies of the project will ensure avoidance of re-compilation and re-deployment.

Takeaways

  • All promoted properties and distinguished fields must be initialized with the default values in the schema.
  • Generally, all schemas must be placed in a separate project/DLL, and all related Orchestrations must also be placed in a separate project/DLL.
  • It is generally observed, in many cases, that map transformations are done within the Orchestration; this is unnecessary, and the same can be achieved in the Send and Receive Ports as demonstrated in the article.

License

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