Blogging BizTalk

Lets Discuss BizTalk

Tag Archives: Logic

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:

Image

Incoming Schema:

Image

OutGoing Schema:

Image

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.

Image

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.

Advertisements
D Goins Insperience

Technological outformation for this day and age

[INACTIVE BLOG] Connected Thoughts - Thiago Almeida

Connected systems and the occasional picture

Uri Katsir's Blog

BizTalk , BizTalk RFID and .NET

prashantbiztalkblogs

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

Articles about BizTalk Server and .NET C#

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

jhelatissimo

a blogger in the process.

MS Innovations Blog

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

srirambiztalks

Katradhu Kaialavu,Kalladhadhu Ulagalavu!

Vijay Microsoft Technical

BizTalk, WCF, ESB ToolKit, Windows Azure

Mind Over Messaging

Musings on BizTalk, Azure, and Enterprise Integration