locked
Initialization Correlation Set and Following Correlation Set in BizTalk Server 2010. RRS feed

  • Question

  • Hi,

    I am newbie in BizTalk server. I have learned about correlation. I am confused about initializing correlation set and following correlation set. I have already searched on Google. I have found so many article about correlation but I didn't find any article which explain these properties.

    Please explain.

    Thanks,
    Mohit Dahiya
     

    Monday, June 13, 2016 10:22 AM

Answers

  • Hi Mohit,

    Refer the Technet article to understand the working of Correlations in Biztalk: http://social.technet.microsoft.com/wiki/contents/articles/13729.walkthrough-correlations-in-biztalk-orchestration.aspx 

    Also refer: BizTalk Correlation

    Initializing Correlation Sets
    1) Correlation Sets initialized on a Receive action

    Correlation sets initialized on a Receive action define the exact set of properties that must exist in a published message in order for it to be processed by the corresponding receive action(s) in an orchestration. An initializing correlation set will create a correlation set from a correlation type based on the corresponding values in a document.

    2) Correlation Sets initialized on a Send action

    Correlation sets initialized on a Send action are created from a correlation type based upon the corresponding values in a document and promote the correlation properties in the outbound document.

    Following Correlation Sets

    Following correlation sets can only be bound to a non-activating receive action or to a send action. Following correlation sets are specified in tandem with previously initialized correlation sets.

    1) Following Correlation Sets bound to a Receive action

    Following correlation sets bound to a receive action define the set of properties and values that the document must contain to be received. Receive actions with following correlation sets accept documents that contain properties from a previously initialized correlation set.

    2) Following Correlation Sets bound to a Send action

    Following correlation sets bound to a send action dictate that the set of properties in the correlation set are promoted in the outbound document.

    MSDN: Correlation Sets

    A use case is:

    You initialize the correlation set values in the Send shape so that subsequent incoming messages will correlate based on the value of the promoted field in the message. If you expect to receive either a direct or indirect response to a message that you have previously sent, you must correlate the message with the currently running instance of the orchestration.


    Rachit Sikroria (Microsoft Azure MVP)

    Monday, June 13, 2016 10:27 AM
    Moderator
  • Hi Mohit,

    Since you are a newbie to BizTalk lets try to make you understand in simple words :

    Plain words :

    Think of correlation set as a stamp on a message that is to be sent to external system and the response message should also contain that stamp to receive that particular message.

    Technical Words :

    Suppose you want to send a message to other system and the message is a Customer message with following details.

    CustomerID,CustomerName,CustomerAddress.

    You put initialization of correlation set on send port and follow correlation set on receive location (there could be other ways of using correlation set as well) :

    Now you will promote the CustomerID property (to make a stamp), now suppose the message received by BizTalk contains CustomerID = 100, so this 100 value would be promoted and written to message box and will be used in subscription. Now the BizTalk will send this message to other system with CustomerID = 100 and wait for the response. When the response will come then BizTalk will check that the response message also contains value of CustomerID = 100 then only this particular instance of the Orchestration will receive the message.

    Just try to understand this scenario and later learn more about correlation set.

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Regards

    Rahul Madaan

    biztalkvillage.blogspot.com

    Monday, June 13, 2016 12:21 PM

All replies

  • Hi Mohit,

    Refer the Technet article to understand the working of Correlations in Biztalk: http://social.technet.microsoft.com/wiki/contents/articles/13729.walkthrough-correlations-in-biztalk-orchestration.aspx 

    Also refer: BizTalk Correlation

    Initializing Correlation Sets
    1) Correlation Sets initialized on a Receive action

    Correlation sets initialized on a Receive action define the exact set of properties that must exist in a published message in order for it to be processed by the corresponding receive action(s) in an orchestration. An initializing correlation set will create a correlation set from a correlation type based on the corresponding values in a document.

    2) Correlation Sets initialized on a Send action

    Correlation sets initialized on a Send action are created from a correlation type based upon the corresponding values in a document and promote the correlation properties in the outbound document.

    Following Correlation Sets

    Following correlation sets can only be bound to a non-activating receive action or to a send action. Following correlation sets are specified in tandem with previously initialized correlation sets.

    1) Following Correlation Sets bound to a Receive action

    Following correlation sets bound to a receive action define the set of properties and values that the document must contain to be received. Receive actions with following correlation sets accept documents that contain properties from a previously initialized correlation set.

    2) Following Correlation Sets bound to a Send action

    Following correlation sets bound to a send action dictate that the set of properties in the correlation set are promoted in the outbound document.

    MSDN: Correlation Sets

    A use case is:

    You initialize the correlation set values in the Send shape so that subsequent incoming messages will correlate based on the value of the promoted field in the message. If you expect to receive either a direct or indirect response to a message that you have previously sent, you must correlate the message with the currently running instance of the orchestration.


    Rachit Sikroria (Microsoft Azure MVP)

    Monday, June 13, 2016 10:27 AM
    Moderator
  • Hi,

    Best place to resources about the correlations is MSDN, refer below articles and follow the instructions with sample scenario given.

    https://msdn.microsoft.com/en-us/library/aa560163.aspx

    https://msdn.microsoft.com/en-us/library/aa561987(v=bts.20).aspx

    Hope this Helps!!!

    Please Mark as Answered if you satisfy with Reply.

    • Proposed as answer by vikas.a.mehta Monday, June 13, 2016 10:41 AM
    Monday, June 13, 2016 10:41 AM
  • Hi Mohit,

    Since you are a newbie to BizTalk lets try to make you understand in simple words :

    Plain words :

    Think of correlation set as a stamp on a message that is to be sent to external system and the response message should also contain that stamp to receive that particular message.

    Technical Words :

    Suppose you want to send a message to other system and the message is a Customer message with following details.

    CustomerID,CustomerName,CustomerAddress.

    You put initialization of correlation set on send port and follow correlation set on receive location (there could be other ways of using correlation set as well) :

    Now you will promote the CustomerID property (to make a stamp), now suppose the message received by BizTalk contains CustomerID = 100, so this 100 value would be promoted and written to message box and will be used in subscription. Now the BizTalk will send this message to other system with CustomerID = 100 and wait for the response. When the response will come then BizTalk will check that the response message also contains value of CustomerID = 100 then only this particular instance of the Orchestration will receive the message.

    Just try to understand this scenario and later learn more about correlation set.

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Regards

    Rahul Madaan

    biztalkvillage.blogspot.com

    Monday, June 13, 2016 12:21 PM