Direct binding in Biztalk Server 2004 can be used to send messages from one Orchestration to another. It can also be used to send messages directly into the message box, but that is not the focus of this post. Direct binding is easily misunderstood, specifically Partner Port binding since can be somewhat confusing to set up.


I will walk through the 4 simple steps to set up direct binding using partner ports.


It is important to note direct binding still uses the publish and subscribe system in Biztalk to send messages between Orchestrations.


Terminology:
Orchestration1 – The process that will send the message to another Orchestration.


Orchestation2 – The process that will receive the message from another Orchestration.


Step 1: Create a new port and port type in Orchestation2. Note that you can also use any existing internal or referenced public port type.


Biztalk Direct Binding Step 1



Step 2: Set Porting Bindings. Select Direct Binging, Partner Port – 3rd radio button. Select the new port you are creating in the Port On Partner Orchestration drop down.


Biztalk Direct Binding Step 2



Step 3: Create a new port in Orchestration1 using the existing port type created (or selected) in Step 1.


Biztalk Direct Binding Step 3



Step 4: Set Porting Bindings. Select Direct Binging, Partner Port – 3rd radio button. Select the port you created in Step 2 on Orchestration2 in the Port On Partner Orchestration drop down.


Biztalk Direct Binding Step 4



It is that easy. If you have additional questions or want more information on Direct Binding, Charles Young has by far the best blog posting on this subject.


I have also put together a sample. This sample shows how to use Direct Binding with Partner Ports to send a message from one Orchestration to another.


Download: Biztalk Direct Binding Sample


To run the sample, just deploy the solution and start both Orchestrations. Drop a message into the In folder and it shows up in Out. Check HAT, you will see both Orchestrations ran.