none
Read BizTalk Context Property in Orchestration RRS feed

  • Question

  • Hi All,

    I have write one custom property in pipeline component  like below.

    pInMsg.Context.Write("xxx", "http://schemas.microsoft.com/BizTalk/2003/system-properties", xxxValue);

    I want to retrieve this property in Orchestration. I am not promoting property, so not using Property schema. 

    Regards,

    Saurin

    Friday, November 24, 2017 11:20 AM

Answers

  • Hi Saurin,

    You cannot use a System Namespace for your custom property in your assignment statement.

    Stephen Kaufman has in a blog listed all message properties that you can access when you are in a pipeline component

    You have two choices:

    1) Deploy a custom Property Schema, then set and read those in the Orchestration and Pipeline Component.

    2) Reuse similar system Context Properties that are not relevant to you specific process.  My opinion, there is nothing wrong with this so long as the property you're commandeering is reasonably appropriate.
    For example, using EDI.ISA05 and EDI.ISA07 for a Sender and Receiver ID makes reasonable sense, even if you're not using actual X12 EDI as highlighted by John here.


    Rachit Sikroria (Microsoft Azure MVP)


    Friday, November 24, 2017 12:26 PM
    Moderator

All replies

  • Hi,

    You will need to change the line of code in your pipeline to use the Promote
    method instead of Write

    pInMsg.Context.Promote("xxx", "http://schemas.microsoft.com/BizTalk/2003/system-properties", xxxValue);


    Refer: http://biztek.blogspot.co.uk/2007/01/read-your-application-name-in-pipeline.html

    Difference between Context.Promote and Context.Write is using Context.Promote property is promoted in context of message and it can be used in Orchestration and at port level for routing.
    But in Context.Write property is not promoted in message context and it can only be used in orchestration (like Distinguish property)


    Rachit Sikroria (Microsoft Azure MVP)

    Friday, November 24, 2017 11:26 AM
    Moderator
  • Thanks for reply, 

    I agree about your comment,

    Difference between Context.Promote and Context.Write is using Context.Promote property is promoted in context of message and it can be used in Orchestration and at port level for routing.
    But in Context.Write property is not promoted in message context and it can only be used in orchestration (like Distinguish property)

    If I promote property, how can i access that property without using property schema, as we are promoting to system-property namespace.

    pInMsg.Context.Promote("xxx", "http://schemas.microsoft.com/BizTalk/2003/system-properties", xxxValue);

    Regards,

    Saurin

    Friday, November 24, 2017 11:41 AM
  • Hi Saurin,

    You cannot use a System Namespace for your custom property in your assignment statement.

    Stephen Kaufman has in a blog listed all message properties that you can access when you are in a pipeline component

    You have two choices:

    1) Deploy a custom Property Schema, then set and read those in the Orchestration and Pipeline Component.

    2) Reuse similar system Context Properties that are not relevant to you specific process.  My opinion, there is nothing wrong with this so long as the property you're commandeering is reasonably appropriate.
    For example, using EDI.ISA05 and EDI.ISA07 for a Sender and Receiver ID makes reasonable sense, even if you're not using actual X12 EDI as highlighted by John here.


    Rachit Sikroria (Microsoft Azure MVP)


    Friday, November 24, 2017 12:26 PM
    Moderator