The Context Accessor functoid, part II

by eliasen 15. april 2009 22:11

Hi all

I had a post about one of the context accessor functoids which can be seen here: http://blog.eliasen.dk/2009/04/01/TheContextAccessorFunctoidPartI.aspx

This post is about the other one – the one that can only be used in a map that is used in a receive port.

Basically, the functoid takes in three inputs:

GetReceivedFilename

The first is the name of the property and the second parameter is the namespace of the property schema this property belongs to. The third parameter is an optional string that is returned in case the promoted property could not be read.

This functoid only works in a map that is called in a receive port and only if the receive location uses a pipeline that uses the ContextAccessorProvider pipeline component that is included in he same DLL as the functoids.

What the pipeline component does is, that it takes the context of the incoming message and saves it in a public static member. This way, the functoid can access this static member of the pipeline component and read the promoted properties this way.

Good luck using it.

--
eliasen

Tags:

Comments (3) -

Alex
Alex
01-03-2011 23:18:13 #

Since the data is saved in a static member, how will work in case multiple messages are received at the same time?

Reply

Jan Eliasen
Jan Eliasen
06-03-2011 10:39:51 #

Hi

The context of the message is saved in a static field that has the "ThreadStatic" attribute set on it, making it static within the thread and not globally. The pipeline component and functoid operate under the assumption that the processing of a message does not change threadbetween the pipeline and the receive port map, and also under the assumption that no two messages are handled within the same thread.

For now these assumptions are valid. Future releases of BizTalk may drop this, who know...

--
eliasen

Reply

tour sri lanka
tour sri lanka United States
29-07-2017 11:41:51 #

I have find nice travel guide <a href="http://tour.lk/destinations/">destinations - tours in Sri lanka </a>

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List