Blogging BizTalk

Lets Discuss BizTalk

Orchestration To Orchestration Call Via Direct Bound Ports For A Synchronous Process

This is a demo for calling one orchestration from another orchestration via direct bound port. Please note there is a strong binding between receiver and sender orchestrations hence if the receiver orchestration contracts or version changes at any point of time you will have to incorporate that in your sender orchestration as well.

Scenario: The main orchestration calls the sub orchestration and waits upon the reply to come back from sub orchestration to continue further.

Logic Behind: The main orchestration refers to the contract of the suborchestration via an assembly or directly (as I have done in this example). The main orchestration passes a unique promoted property to the sub orchestration(It can be a set of properties as well).Please ensure whatever property you are promoting has to be unique for each instance of the calling orchestration. The sub orchestration does its flow and before sending back the response it also returns the promoted property written in context of its response, back to the main orchestration. Now the main orchestration has a receive port listening on the sub orchestration response, it is following a correllationSet defined for the promoted property. Confused ? Ok, lets  walk through on how this has been implemented from coding perspective and I hope you will know what I am trying to explain.

1>Create a new BizTalk project and add two orchestration files there.

  • MainOrchestration.odx
  • SubOrchestration.odx

Define the request and response schemas for each of the orchestration. The body of the orchestration will look like this. I am not doing any complex logic here. The main orchestration creates the sub orchestration request>> sends it to the messegebox>> pick up the response from the message box>>creates its own response and sends it to a file send location. The main orchestration body will look like this.


2>We need to assign a unique property to the sub orchestration request message. I have created a property schema and will be using it to define my correlation property.


3>Since this unique property has to be available in the context of the sub orchestration request message it has to be promoted , we accomplish this by creating a new correlation set with the identified unique property.

4>Initialize this correlation set on the send shape for sending sub orchestration request and follow it on receive shape for the sub orchestration response.

write the remaining portion of Main Orchestration and you are done with it here.

5>The sub orchestration will look like this.


6>Since the sub orchestration needs to return the property which was sent by the main orchestration here also you need to create another promoted property used to store the value sent by main orchestration.


=Please note all the ports used to communicate with the sub orchestration is of direct binding type( Silly to mention but that is what I have designed this solution around)

Create a file receive port and trigger your orchestration. You should be able to see the following execution.This completes the demo. Please leave me a comment if you need some clarification or help. I will get back ASAP. Thanks.



6 responses to “Orchestration To Orchestration Call Via Direct Bound Ports For A Synchronous Process

  1. Vinícius February 21, 2014 at 12:58 am

    Hi, Pushpendra.

    This approach is better than call orch in performance terms?

    • Pushpendra Singh February 21, 2014 at 2:56 am

      Hi Vinicius,

      Content based routing or the ESB Itinerary designs are anytime a better approach then using orchestration. However there are high chances that you may have to use orchestration in case you implementation is in SOA architecture.

      Coming to orchestration to orchestration call via msgbox is only useful when you have an another orchestration B and for some reason you cannot do the orchestration B changes to accept parameters. It will come handy in that scenario. Also for throttling pattern you are going to need this approach.

      To your question yes this has performance impacts(In fact using orchestration will always have one :-)) since you are going to use property schemas and also the orchestration state will be persisted. If the design permits you can also use the start orchestration shape in asynchronous design or call orchestration shape for a synchronous design as well.


  2. Mahindra February 6, 2015 at 9:32 am

    Hi Pushpendra Singh,

    I am an enthu learner of Biztalk. Gone through your above example. It was interesting. But if you had given more details like the schemas you designed, and exact place of each schema in the above example, and more explanation on what the suborch is doing, it would have been good.
    Could you please explain me more details on the above example . Please…..


    • Pushpendra Singh February 6, 2015 at 2:23 pm

      Hi Mahindra, the schemas are generic. It would work with any schema. Let me send you the source code. Try analyzing it.


  3. Nikhil Sinha October 13, 2016 at 8:02 am

    Hi Pushpendra,
    I got the point you are making here. Can you send me the source code and I will try something out for my requirement in the similar lines.

    • Pushpendra Singh October 13, 2016 at 1:55 pm

      Hi Nikhil, I will find and share, its been a long time since I wrote this.

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

Uri Katsir's Blog

BizTalk , BizTalk RFID and .NET


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

%d bloggers like this: