locked
How to Implement Correlation in .NET RRS feed

  • 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 y
          internal 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 received 
    Production 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

    then

    I 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, -Rohit
    Monday, June 6, 2011 3:01 PM
    Moderator
  • 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, -Rohit
    Monday, June 6, 2011 3:09 PM
    Moderator
  • 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 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, -Rohit
    Should the table be written into both the production servers and then write/update each time to both the tables in both servers 
    Monday, 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)
    Thanks Alastair but i don not have control on carrier response they are fixed set of request-response and as i said i cannot implement correlation due to due to production setup limitations
    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, -Rohit
    Should the table be written into both the production servers and then write/update each time to both the tables in both servers 

    The 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, -Rohit
    Monday, June 6, 2011 6:38 PM
    Moderator
  • 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)
    Thanks Alastair but i don not have control on carrier response they are fixed set of request-response and as i said i cannot implement correlation due to due to production setup limitations
    Have your request-response pair of messages something that can be used for correlation? They possibly have some unique data set. Otherwise it doesn't make sense to correlate them at all.
    Can you, please, elaborate, what do you mean as "due to production setup limitations"? 

    Leonid Ganeline [BizTalk MVP] BizTalkien: Microsoft 2011 MVP Global Summit: Pictures
    Monday, June 6, 2011 11:13 PM
    Moderator
  • 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: Pictures
    Tuesday, June 7, 2011 3:53 PM
    Moderator
  • 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

    then

    I 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