Create Context property to be used in subscription

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Create Context property to be used in subscription

Viewing 1 reply thread
  • Author
    Posts
    • #22536

      Hi,

      I need to do filtering based on property not present in schema.So, I thought of creating a pipeline component which based on business rues wil create the property into message context. But, How do I use the property for filtering?

      . Now, message schema do not have corresponding field, so I cannot promote property to property schema.Without promotion, I ca not use property for fitering.

      Looking for some soution/Inputs?

      Thanks in advance.

    • #22539

      Hi, 

      There’s 2 types of properties in the context of a message

      1. properties based on values of a specific field of your chosen schema (MessageDataPropertyBase) and
      2. properties not base on any fields of your chosen schema (MessageContextPropertyBase) [Example of this is BTS.MSMQ.Label, BTS.FILE.SourceFileName etc.]

      Property #2 (based on message field data) are automatically written and promoted into message context by BTS. You can promote property #1 (not based on any message field data) inside an orchestration using expression shape, for example YourMessage(Namespace.PropertyName) = “PropertyValue”.

      According to your decription above, it seems like you need to work with MessageContextPropertyBase property. The problem with this type of property is that the value you assign inside the orchestration is not promoted, they are only written to the message context. Because of this, you can’t use tis property for routing.

      However, you can create a custom pipeline componenent that promote the properties. Jon Flander has created a custom component that “you can place in any stage of either a Receive or Send pipeline, and you can configure it with a collection of Context properties (simple written properties or promoted properties). The component will just blindly put whatever values you configure it with into the context” You probably need to download the source code and make small modification to the code to suit your needs.

      Hopefully this helps.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.