Click here to Skip to main content
Click here to Skip to main content

Keep The Orchestration Simple (KTOS) - A BizTalk Pattern

, 26 Apr 2006
Rate this:
Please Sign up or sign in to vote.
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)

Share

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)
http://biztalkcontrolcenter.codeplex.com

Comments and Discussions

 
QuestionRegarding xml debatch Pinmemberraghavdon13-Mar-09 8:59 
Hi I want to debatch a xml message from my original message
 
My scenerio is I receive a message and in the orchestration input msg is transformed into another msg and this newly transformed msg has 3 records and I have to debatch these records into 3 xml documents and send them to a .net component, so for this debatch I went through a article
<a href="http://www.biztalkgurus.com/media/p/15489.aspx">http://www.biztalkgurus.com/media/p/15489.aspx</a>[<a href="http://www.biztalkgurus.com/media/p/15489.aspx" target="_blank" title="New Window">^</a>]
 
and I did it without creating an envelope schema because i thought of no use in my case but I gettin an error
 
Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'TEMSInt.TemsOrchestration(10e74d9f-953f-b28d-425d-5fdbee10e5c7)'.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: b1c0672a-6543-43cd-83d0-c93e19d1c107
Shape name: Expression_1
ShapeId: 2eb82b17-4473-4f3e-9bf1-a53b3a91973a
Exception thrown from: segment 1, progress 19
Inner exception: Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.
           
Exception type: XPathException
Source: System.Xml
Target Site: MS.Internal.Xml.XPath.Query get_QueryTree()
The following is a stack trace that identifies the location where the exception occured
 
   at MS.Internal.Xml.XPath.CompiledXpathExpr.get_QueryTree()
   at System.Xml.XPath.XPathNavigator.Evaluate(XPathExpression expr, XPathNodeIterator context
 
so how do i overcome this do we have any other option for this xml debatching, it would be great if know any option.
 
Thanks
AnswerRe: Regarding xml debatch PinmemberNaveen Karamchetti24-Mar-09 12:37 
Questionhow to configure send port for more than one partner PinmemberAlaaJarrah28-Apr-08 12:34 
AnswerRe: how to configure send port for more than one partner PinmemberNaveen Karamchetti24-Mar-09 12:39 
Generalsimple but complicate things PinmemberBogdan Nedelcu17-Apr-06 20:25 
GeneralRe: simple but complicate things PinmemberNaveen Karamchetti17-Apr-06 21:29 
GeneralRe: simple but complicate things PinmemberBrad Friedlander20-Apr-06 4:08 
GeneralRe: simple but complicate things Pinmemberjmicksch26-Apr-06 10:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 27 Apr 2006
Article Copyright 2006 by Naveen Karamchetti
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid