Answered by:
How to Implement Correlation in .NET

Question
-
Hi all,
I have a issue in my orchestration there is a request response port which calls one of carrier web service
the problem is the carrier web-service operation is asynchronous (i mean it dosent send a response right away but we do not have timeline when the response arrives)
i can implement this using correlation normally
request - response schema's to web services
<request><operation request> // operation can be x or yinternal nodes</operation request></request><response><operation response>internal nodes</operation response></response>As Web service for one operation is asynchronous i wont get response immediately so i need to invoke my orchestration when the response message is receivedProduction Setup:Node A : A biztalk server with Sql server and message box
Node B : A biztalk server with Sql server and message box
both nodes are not clustered but they are independent nodes only one node will be active and the other one will be passive
due to this setup as message box is different for both nodes when they switch from node a to b correlations in A will not be available in B so i cant use it
Present status
I have split my orchestration to two parts send orchestration will send to the web service
and receive orchestration should be receiving from directly bounded port to MsgBox in biztalk and process it
so here's where i'm stuck.. i need to capture the response message from Async web service and then place it in msg box whenever i receive it.
looking for a workaround Any Suggestions..plz
- Edited by btsdude Tuesday, June 7, 2011 5:43 PM
Monday, June 6, 2011 2:27 PM
Answers
-
SOLVED:
I have split my orchestration to two parts send orchestration will send to the web service
and receive orchestration should be receiving from directly bounded port to MsgBox in biztalk and process it
thenI created a external SQL table and store the request message, status and correlation properties
then i checked it while i pass the message to my receive orchestration
-@btsdude- Marked as answer by btsdude Tuesday, June 7, 2011 8:42 PM
Tuesday, June 7, 2011 8:42 PM
All replies
-
Can you elaborate a bit more about your environment:
node a , node b individual nodes with independent message boxes to each of them , so when we switch nodes correlations will not be updated on other node
What does this mean?
Mark As Answer or Vote As Helpful if My Reply Does, Regards, -RohitMonday, June 6, 2011 3:01 PMModerator -
If you don't want to use correlation then in your send orchestration you can store the information about your message in SQL database ( the information which can be used for correlating response message with request message) and then in receive orchestration you can receive any message, say based on message type, and can then use the information store in SQL database(in send orchestration) to know for which message this response has been received and can update the information in SQL database accordingly.
Mark As Answer or Vote As Helpful if My Reply Does, Regards, -RohitMonday, June 6, 2011 3:09 PMModerator -
You can correlate on any unique property. When you send your request you will need to ensure a bit of data (preferably a GUID) is sent, and then returned with the asynchronous response.
Use a Property Schema to promote the field on both your request and response schemas. You can then use this property in an Orchestration as the basis of a Correlation Set.
If you have two isolated servers that are potentially receiving messages which originated from the other server, you will need to share you unique data between them. The easiest way to do this is probably using an external database table to store the unique ID and whatever flags you need for your receiving server to know how to process it.
If this is helpful or answers your question - please mark accordingly.
Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)- Proposed as answer by Leonid GanelineModerator Monday, June 6, 2011 11:08 PM
Monday, June 6, 2011 3:11 PM -
Node A : A biztalk server with Sql server and message box
Node B : A biztalk server with Sql server and message box
both nodes are not clustered but they are independent nodes only one node will be active and the other one will be pas
Monday, June 6, 2011 3:31 PM -
If you don't want to use correlation then in your send orchestration you can store the information about your message in SQL database ( the information which can be used for correlating response message with request message) and then in receive orchestration you can receive any message, say based on message type, and can then use the information store in SQL database(in send orchestration) to know for which message this response has been received and can update the information in SQL database accordingly.
Mark As Answer or Vote As Helpful if My Reply Does, Regards, -RohitMonday, June 6, 2011 4:09 PM -
You can correlate on any unique property. When you send your request you will need to ensure a bit of data (preferably a GUID) is sent, and then returned with the asynchronous response.
Use a Property Schema to promote the field on both your request and response schemas. You can then use this property in an Orchestration as the basis of a Correlation Set.
If you have two isolated servers that are potentially receiving messages which originated from the other server, you will need to share you unique data between them. The easiest way to do this is probably using an external database table to store the unique ID and whatever flags you need for your receiving server to know how to process it.
If this is helpful or answers your question - please mark accordingly.
Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)Monday, June 6, 2011 4:11 PM -
If you don't want to use correlation then in your send orchestration you can store the information about your message in SQL database ( the information which can be used for correlating response message with request message) and then in receive orchestration you can receive any message, say based on message type, and can then use the information store in SQL database(in send orchestration) to know for which message this response has been received and can update the information in SQL database accordingly.
Mark As Answer or Vote As Helpful if My Reply Does, Regards, -RohitThe best option will be to keep this table at a single place and make it accessible to both nodes.
Mark As Answer or Vote As Helpful if My Reply Does, Regards, -RohitMonday, June 6, 2011 6:38 PMModerator -
You can correlate on any unique property. When you send your request you will need to ensure a bit of data (preferably a GUID) is sent, and then returned with the asynchronous response.
Use a Property Schema to promote the field on both your request and response schemas. You can then use this property in an Orchestration as the basis of a Correlation Set.
If you have two isolated servers that are potentially receiving messages which originated from the other server, you will need to share you unique data between them. The easiest way to do this is probably using an external database table to store the unique ID and whatever flags you need for your receiving server to know how to process it.
If this is helpful or answers your question - please mark accordingly.
Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)
Can you, please, elaborate, what do you mean as "due to production setup limitations"?
Leonid Ganeline [BizTalk MVP] BizTalkien: Microsoft 2011 MVP Global Summit: PicturesMonday, June 6, 2011 11:13 PMModerator -
If the web-service you are calling is asynchronous, but does require and respond with any form of unique ID, then there is little you can do. Even ignoring your two-server setup; how do you expect BizTalk to match the response message to your request without anything unique?
How were you planning on correlating in your design?
If this is helpful or answers your question - please mark accordingly.
Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)Tuesday, June 7, 2011 10:41 AM -
Sorry, still cannot get your question.
Can you, please, formulate your question agan. Without any unrelated details.
Leonid Ganeline [BizTalk MVP] BizTalkien: Microsoft 2011 MVP Global Summit: PicturesTuesday, June 7, 2011 3:53 PMModerator -
SOLVED:
I have split my orchestration to two parts send orchestration will send to the web service
and receive orchestration should be receiving from directly bounded port to MsgBox in biztalk and process it
thenI created a external SQL table and store the request message, status and correlation properties
then i checked it while i pass the message to my receive orchestration
-@btsdude- Marked as answer by btsdude Tuesday, June 7, 2011 8:42 PM
Tuesday, June 7, 2011 8:42 PM