Improved Context Accessor Functoid

Improved Context Accessor Functoid

Remember the Context Accessor functoid I wrote about in this previous post? I ran into some limitations–namely, the fact that you cannot output the functoid to any other functoids, only a target field. Well, Chompers also found this issue to be frustrating, and found a workaround. He recommended making two changes in his post on the codeplex site. Since the Codeplex source code has not been updated with his recommended  change, I went ahead and downloaded the source code, made the changes, and rebuilt the code. Here it is:

http://dl.dropbox.com/u/18955972/ContextAccessorSourceCode.zip

You can find the DLL in /ContextAccessor/bin/Debug

Now, for those that don’t know how to use this functoid, there are two ways:

  1. Maps used in a Receive Port
  2. Maps used in an Orchestration

Maps used in a Receive Port

  1. Grab the .dll
  2. Save the .dll to \Microsoft BizTalk Server 2010\Developer Tools\Mapper Extensions
  3. Save the .dll to \Microsoft BizTalk Server 2010\Pipeline Components
  4. GAC both assemblies
  5. Add the functoids to your functoid Toolbox
    • Toolbox>Right Click>Choose Items…>BizTalk Mapper Functoids
  6. Drop the functoid into your map, and configure it
    MapCxA
  7. Add the ContextAccessorProvider pipeline component to your pipeline Toolbox
    • Toolbox>Right Click>Choose Items…>BizTalk Pipeline Components
  8. Drop the ContextAccessorProvider pipeline component into a pipeline at the ResolveParty stage
    PipelineCxA
  9. Build and deploy! Be sure to use your custom pipeline, and apply the map in the receive port

Maps used in an Orchestration

  1. Grab the .dll
  2. Save the .dll to \Microsoft BizTalk Server 2010\Developer Tools\Mapper Extensions
  3. GAC your assembly (if you already did this, you do not have to do this again)
  4. Add the functoids to your functoid Toolbox
    • Toolbox>Right Click>Choose Items…>BizTalk Mapper Functoids
  5. Drop the functoid into your map, and configure it
    Screen Shot 2013-02-20 at 11.05.35 AM

And that’s it! If you have any questions about using this, just post a comment, and I will get back to you. I want to make it clear that I did not write this code. I just made the modifications that Chompers recommended, and re-posted it so others could use it without having to get into re-building the functoid in visual studio. Thank you to Marvin Smit and Carlos Medina for creating these functoids to begin with.

Please leave a comment if you downloaded and used this functoid. I would love to see how it helped you out!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s