Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 132, comments - 146, trackbacks - 438

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

In the past, I have tended to focus on sequential convoys.  Now, I decided to take a look at Concurrent Convoys.  First off, I was sure in older versions of the documentation they were called Parallel Convoys?  Maybe I’m mistaken or maybe the name changed over the past few months….  In any case, I will get with the times and call them Concurrent Convoys.  No matter what you call them, the power and usefulness of this type of convoy is the same.

 

Why use Concurrent Convoys?  Concurrent convoys allow you to receive multiple items in any order that all need to be processed by the same Orchestration before the next step in the process can happen. 


Setting up and using a Concurrent Convoy is rather straight forward.  All you have to do is drop a Parallel Shape inside your Orchestration.  Then, drop in your multiple Receive Shapes. If this is the first shape in your Orchestration then each Received must be set with Activate = True and all must initialize the same Correlation Set.  Otherwise, they must all follow the same Correlation Set that was initialized by a Send Shape.  That is all your need to do!

 

I have included a sample with two different Orchestrations.  One Orchestration shows a Concurrent Convoy with Active Receives and one without Active Receives.

 

The Orchestration with Activate Receives has two sets of sample files.  The set with ID 100 will produce 8 total records in the output file.  The set with ID 500 produces 6 records.  Note that since all three messages arrive on different ports, Receive Port mapping is possible to get all inbound documents into a common format (not shown in my sample). 

 

The Orchestration without Activate Receives uses the same set of sample files but it requires a Start Message to be received and a message to be sent out to initialize the correlation.  This will produce the same output of 8 and 6 records.  In this Orchestration, all the Receives uses the same Receive Port.

 

For information on how to run the samples, please see the Read Me file.

Make sure you keep an eye on the BTSSubscriptionViewer tool (located in the SDK).  Note the differences between the two Orchestrations.

 

DOWLOAD: Sample Concurrent Receive Convoys

 

Bonus:  I also show a simple say to merge all three messages together into a single output.  This uses a map inside the Orchestration. 

Print | posted on Sunday, November 07, 2004 9:19 PM |

Feedback

Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

How it is possible to achive following: During runtime orchestration find out that need to send N messages and then need to receive response for all N messages (convoy). How to achive this ?
12/10/2004 8:15 AM | Dejan Petkovic
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

I think you could achieve this by sending a start message to the Orchestration with the number of messages you need. Then, loop that many times on the Receive to get each message. The question is how to know at runtime how many message you need.

Stephen W. Thomas
12/13/2004 6:50 PM | Stephen W. Thomas
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

I wonder, how do u map 3 message to single message in the map, I tried to do the same, but I could n't
would u explain how ?
2/3/2005 6:33 PM | Tareq Muhammad
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

Tareq,

Please see this post: http://www.geekswithblogs.net/sthomas/archive/2005/02/04/21969.aspx

Hope this helps.

Stephen W. Thomas
2/4/2005 1:45 AM | Stephen W. Thomas
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

Thanks man,
I got it.
2/4/2005 2:33 AM | Tareq Muhammad
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

I have an orchestration which I want to publish as a webservice. Like a typical orchestration, I am not having any schemas that I do the mapping. Instead I am working with .NET objects that I create from a references dll.

This orchestration has a parallel convoy, with each receive shape sending and receiving from the same port but different operations. This forces me to create correlation set for the receive shapes.

I have no clue how to co-relate these receive shapes. They are totally different message types and have no connection with each other. The only reason I am doing it as a parallel convoy is becuase, I want to expose this orchestration as a web service and have only one web service(port) with multiple methods (operations), so that my client can call different methods based on a context.

Is using a parallel convoy good in such a case or is there another way. Also, for these .NET objects how can I create a correlation set??
9/20/2005 8:20 AM | Lakshmi Kumar
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

I am trying to do a variation on your sample(which was very helpful). However, in your example each file contains only one correlation ID. The input files(csv) that I am working with each have multiple items; so for instance I
need to merge a file that looks like:
id1, data1, data2, data3
id2, data1, data2, data3
id3, data1, data2, data3

with a file that looks like:
id1, data4
id2, data4
id3, data4

to get:
id1, data1, data2, data3, data4
id2, data1, data2, data3, data4
etc.....

I have tried many schema and mapping combinations but so far with no success.
Any suggestions?
Thanks



10/19/2005 5:26 PM | Garrett Rogers
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

I'm trying to receive 2 different messages on the same receive port. I have a custom pipeline that i'm using to modify one of those messages.

Any ideas?
Thanks
Craig
11/29/2005 8:54 AM | Craig Fisher
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

The easiest way is to have two different Receive Locations – that is if you can tell the two messages apart somehow.

Otherwise, you would need to have logic in your custom pipeline to process one message and by pass the other.

Hope this helps.
11/29/2005 9:41 AM | Stephen W. Thomas
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

How would I set up an orchestration that activates on the either the reciept of one message type in a file location --OR-- another message type. i.e. there is no correlation between the messages.

For an example, a flat file is received into c:\filedrop\*.csv and processed by the orchestration, which sends an infopath document if records are invalid. A user edits the invalid records in the infopath document and saves it to c:\filedrop\*.xml. We would like a new instance of the orchestration to process the xml message.

As far as I can see a parrallel receive convoy is not appropriate, as either message format may be received, but never both, to activate the orchestration.
1/9/2006 5:51 PM | Nick Schmidt
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

Hi,

I am new to Biztalk 2004!!! is there any way to to receive three different messages (different xml schemas) on the same location.

I can write many Orchestrations but want the recive location to be the same to process diffeent types of XML
Any help is appreciated.
4/15/2007 7:12 AM | PS
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

I have same kind of situation but only difference is that i have one xml file and other is binary file. I receive xml file first then binary file. How i can place two receive locations in orchestration. I need to create correlation but how i can create it with xml and binary file combination???
6/11/2007 9:45 AM | bill
Gravatar

# re: Concurrent Receive Convoys (Parallel Convoys) in BizTalk 2004

You need to have something to correlation them on. This could be as simple as the same Receive Port – but in most cases it is something inside the message, which will not work for you. How will you know what two messages need to be correlated?
6/12/2007 8:13 AM | Stephen W. Thomas
Gravatar

# I have a parallel Convoy orchestration which has a correlation set property..

Hi,

I need an solution the below problem.
I have a parallel convoy orchestration which receives two files at a time merges them based on the correlation set property which I have set is "ID".
It is working fine. But the deal is when correlation property is misses in second file the first message is going dehydrated state. But in our project the second file is really optional, if it is there just merge them otherwise just process the first file.with the "ID" property.

In brief we don't want to the message to be dehydrated . It should continue processing if the correlation property missed also.
Is there any solution for this type of situation.
Any ideas will be appreciated.We want to continue processing the file which has missed correlation property in second file.

Please help us.
Anybody can email us at svangeti@yahoo.com.


Thanks in advance.
3/29/2008 1:31 PM | svangeti

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 3 and 2 and type the answer here:

Powered by: