This blog is to explain about BizTalk Parallel Convoy.
What is Parallel Convoy?
Parallel Convoy is one type of BizTalk design pattern to achieve particular type of requirements. This can be defined as “A parallel convoy enables multiple single messages to join together to achieve a required result. The set of related messages can arrive in any order, but BizTalk Server must receive all of them before starting the process”
Sample Scenario for Parallel Convoy:
My Orchestration has to produce a customer address which is having Billing and Shipping details.
My Orchestration has to receive the Billing address details from Source A and Shipping Address details from Source B. Once both messages are received, then only my orchestration has to proceed further to produce full customer address. If any one of the addresses are not received, my orchestration has to wait till other message received.
This scenario can be achieved through parallel convoy design pattern in BizTalk.
- We need to create 3 schemas, Correlation type and correlation set.
- Schema1 is for Billing Address
- Schemas 2 is for Shipping Address
- Schema 3 is for Full Customer Address
- Create a correlation type and correlation set using common field “CustId”
2. Insert “ParallelActions” shape into the BizTalk orchestration editor.
3. Drag and drop two receive shapes inside the parallel convoy shape like below
4. Create a message for Billing Address and assign to the shape “Receive_1”
5. Create a message for Shipping Address and assign to the shape “Receive_2”
6. Set “Initializing Correlation Sets” property for both receive shapes with the correlation set created in above steps.
Please note that both receive shapes are having “Initializing Correlation Sets”.
If Receive_1 shape receives the message first, then other receive shape will act as follow correlation on CustId.
If Receive_2 shape receives the message first, then other receive shape will act as follow correlation on CustId.
Once both messages are received then only It will proceed further to apply a map to produce full customer address.
7. Create a map to produce full customer address
Input messages: Billing and Shipping Addresses
Output Messages: Customer Address
Click on “OK”
8. Send the final message (Full Customer Address) to the destination system based on your requirement.
Here is the sample Orchestration view for Parallel Convoy demo.