locked
Common system-property of BizTalk for two way operation(Request Response ) RRS feed

  • Question

  • Hi Guys,

    Is there any system-property of biztalk which remains common for the entire life cycle of biztalk ?

    Message Id changes as it pass through any stages in pipeline as well as in orchestration.

    Interchange Id remains common for one way operation, if we have two way operation then it will be different for both operation.

    I want to co-relate my response with request but there is no common field in request and response message, so I can't use co-relation at this moment.Is there any biztalk property which remains common for two way operation ?

    I want to save my request message in DB with some common identifier and I also want to save my response message to DB for that same identifier so that all my request and response message will remain in one common field.

    Please suggest !


    Thanks

    Thursday, April 6, 2017 10:05 AM

Answers

  • Hi Shivay_,

    Are you using messaging only or an orch?

    If you are using orch, easiest way is to create a guid using System.GUID.NewGuid and insert the request and response against this id, no need to read the properties in message context..

    To answer your first question, yes BTS.EMPRRCorrelationToken remains common across the request response of a port.


    Mandar Dharmadhikari

    Friday, April 7, 2017 9:16 AM
    Moderator
  • Are you trying to say that BTS.EmpRRCorrelationToken  remains unique for two way request response operation if there is no field in common ?

     Yes !!

    Regards.

    Friday, April 7, 2017 9:35 AM
  • For clarity, a two way operation is different from a Two Way Send Port depending on where you are in the process.

    But, if you are indeed using a Two Way Send Port to interact with the target system, the best and correct solution is to use an Orchestration.

    Friday, April 7, 2017 3:39 PM
    Moderator

All replies

  • There is BTS.CorrelationToken and/or BTS.EmpRRCorrelationToken which are used depending on if the pattern is a synchronous response or request-response pattern. These can be used in a direct bound orchestration to bind it to a one-way/two-way port at the same time. These are used in association with other properties such as RouteDirectToTP and IsTwoWay (at the port) to do service correlation.

    Refer https://msdn.microsoft.com/en-us/library/aa560680.aspx for these properties.

    Regards.

    Thursday, April 6, 2017 11:21 AM
  • Very important question, are you using a Two Way Send Port or two One Way Ports?

    The thing is, without a common key in the messages, there is no way to correlate across two One Way operations.  This not a problem with BizTalk, it's a problem with the target application.

    If you are using a Two Way Port, the Orchestration will automatically correlate the Request and Response messages.

    Thursday, April 6, 2017 1:55 PM
    Moderator
  • Hi,

    Orch itself is able to correlate the messages, you can do your logging in the orch itself.

    As pointed out properties will not be preserved if there are two one way ports in the scenario.

    Best bet is to use orch and do the logging


    Mandar Dharmadhikari

    Thursday, April 6, 2017 3:42 PM
    Moderator
  • Are you trying to say that BTS.EmpRRCorrelationToken  remains unique for two way request response operation if there is no field in common ?

    I have already mentioned in my question that there is no common field in request and response message and still I want to save request and response message in DB in one row base on some common field.


    Thanks

    Friday, April 7, 2017 8:33 AM
  • Hi Shivay_,

    Are you using messaging only or an orch?

    If you are using orch, easiest way is to create a guid using System.GUID.NewGuid and insert the request and response against this id, no need to read the properties in message context..

    To answer your first question, yes BTS.EMPRRCorrelationToken remains common across the request response of a port.


    Mandar Dharmadhikari

    Friday, April 7, 2017 9:16 AM
    Moderator
  • Are you trying to say that BTS.EmpRRCorrelationToken  remains unique for two way request response operation if there is no field in common ?

     Yes !!

    Regards.

    Friday, April 7, 2017 9:35 AM
  • Very important question, are you using a Two Way Send Port or two One Way Ports?

    Please help the other members by answering some important questions.  We can provide the best advice if we know some more about your situation.

    Friday, April 7, 2017 1:32 PM
    Moderator
  • As I have already mentioned in my question that I am using a two way send port .

    Thanks

    Friday, April 7, 2017 3:30 PM
  • For clarity, a two way operation is different from a Two Way Send Port depending on where you are in the process.

    But, if you are indeed using a Two Way Send Port to interact with the target system, the best and correct solution is to use an Orchestration.

    Friday, April 7, 2017 3:39 PM
    Moderator