locked
Accessing Context Properties in Send Pipeline RRS feed

  • Question

  • Hi,

    I have a send port that will subscribing to messages from the messagebox. The send port will also implement a map.

    Now my question is, I need to be able to access the context property (file.adapter) from the subscribed message and assign it to the destination message  (within content).

    I have created a property schema that has a property whose propertyschemabase is set to messagecontextpropertybase. I them promoted a field in the destination schema using the property schema.

    Now in a send port the map will execute first and then the pipeline components. So do I loose the source message and its context properties after the map executes. If yes, then how can I assign context value from source message to destination message using a pipeline component? or Is there any other way of doing it. It has to be message only solution.

    Thnaks.... Rick

    Tuesday, May 26, 2015 7:00 PM

Answers

  • Hi I didn't had the need to use the context accessor functoid nor custom pipeline component to resolve my issue.

    I just used property demotion concept and all works fine.

    The only thing I had to do make sure was that that in the send port config for WCF-SQL make sure the operation name reflects the operation name that got demoted from source message(case where you may have a context property for operation in source message) .

    Thanks all..

    • Marked as answer by Kakko72 Wednesday, May 27, 2015 4:09 PM
    Wednesday, May 27, 2015 4:09 PM

All replies

  • You do not loose the context properties on MAP. You can look at the BizTalk Context Accessor Functoid to access the context properties within a map [refer http://contextaccessor.codeplex.com/]

    Another mechanism would be for you to write a custom assembler (where you can call/wrap the native XML or FF assembler) to achieve what you want.

    Regards.

    Wednesday, May 27, 2015 5:02 AM
  • HI Rick..

    1. Make it to MessageDataPropertyBase. Because, by the time the message is created.. the data is there.

    2. The properties are actually copied to the destination message as specified by Shanky

    3. I didn't find a File.Adapter.. what is the property that you are looking for?


    Praveen Behara
    MCST : BizTalk Server 2006 R2, 2010

    Wednesday, May 27, 2015 1:30 PM
  • Hi I didn't had the need to use the context accessor functoid nor custom pipeline component to resolve my issue.

    I just used property demotion concept and all works fine.

    The only thing I had to do make sure was that that in the send port config for WCF-SQL make sure the operation name reflects the operation name that got demoted from source message(case where you may have a context property for operation in source message) .

    Thanks all..

    • Marked as answer by Kakko72 Wednesday, May 27, 2015 4:09 PM
    Wednesday, May 27, 2015 4:09 PM