Blogging BizTalk

Lets Discuss BizTalk

Content Based Routing using a direct bound orchestration

We can achieve the content based routing with orchestration, however like in my previous posts where the input and output message was the same this scenario may get a little tricky.

In this example we will receive an inbound message >> A Receive Port Subscribes to it >> Sends that message to an orchestration >> The orchestration routes it to a send port.

I have used the direct bound port orchestration in my example.

1>Create a receive port

2>Add a new orchestration to your visual studio solution.

In the solution create two schemas for input and output message out of orchestration (This may be little tricky here since we are supposed to route the same message to the outbound location hence the question is, why we are using two separate schemas? >> Explanation : If you have the same message type for both Receive and Send from the orchestration you will end up in infinite loop of same orchestration being triggered multiple times. The reason: orchestration will publish the output in message box, this message should be routed to the send port but instead it will be again subscribed by the orchestration because the message type will be matching the subscription of the orchestration. Hence to avoid this we need to create one more schema having the same structure but will keep a different namespace, hence insuring the output message type is not same  as the input message type.)

This is how our orchestration will look:


Incoming Schema:


OutGoing Schema:


5>Add two maps, one to be used for construction the output message and other to be used in send port for converting the output message from orchestration to map the original input message sent by source system, remember we are supposed to get the same input message at the output.

6>Deploy your orchestration schemas and maps.

7>Create a send port to which the orchestration logical send port would be bound.In this port use the second map which transforms the output message of the orchestration to input type.


8> Bind the orchestration’s logical port to the physical send port, since the logical receive port is directly bound to message box we wouldn’t need an explicit binding for it after deploying the orchestration. However if you wish you can as well use a specify later type of binding for the orchestration logical receive port.

8>Start the orchestration Receive and Send Port and refresh HIS.

Try placing your input file in receive location and you shall be able to see one instance of the orchestration getting triggered successfuly and that on completion will place the output message in your send location.

Need code, please leave me a comment with your email id and I will revert back ASAP.


2 responses to “Content Based Routing using a direct bound orchestration

  1. saffi February 2, 2014 at 9:37 am

    Greet I need the code

    • Pushpendra Singh February 2, 2014 at 5:16 pm

      Hi Saffi,

      Will be sending it to your gmail BOX ASAP.
      Thanks & Regards

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

D Goins Insperience

Technological outformation for this day and age

[INACTIVE BLOG] Connected Thoughts - Thiago Almeida

Connected systems and the occasional picture


My BizTalk Experiences

BizTalk Server Tutorial

BizTalk Server Concepts and Common Errors

Extremely Talented Monkeys

A Technical Blog by Ed Jones: Azure, .NET, BizTalk, WCF, and SQL Server

On All Things Web

Discussing web development without limits

Vikas Bhardwaj's Blog

All about BizTalk Server, Azure and .NET

Cloud develop

a blog about (cloud) development... because I'm a nerd

Hooking Stuffs Together

My learning logs from day to day work experience about Integration platform using Microsoft technologies.

Connected Pawns

Mainly BizTalk & Little Chess


a blogger in the process.

MS Innovations Blog

Tips, Tricks, and Workarounds for BizTalk and other Microsoft technologies


Katradhu Kaialavu,Kalladhadhu Ulagalavu!

Vijay Microsoft Technical

BizTalk, WCF, ESB ToolKit, Windows Azure

Mind Over Messaging

Musings on BizTalk, Azure, and Enterprise Integration

Victor Fehlberg's Tech Postings

Lessons learned in BizTalk Server, C# and Java

%d bloggers like this: