Share via


DBFunktoids for BizTalk Server 2004

I back-ported the original DBFunctoids to BizTalk Server 2004 DBFunktoids and threw in a sample project.

What Did I Learn Back-Porting from 2006 to 2004?

With my developer attitude fully in place, I began the port thinking it would take 10 minutes tops – convert a generic Dictionary to a Hashtable, modify the raw resource file, compile, test and done. Ba-da-bing. But like most seemingly straightforward projects, this one had a hidden gotcha: BizTalk Server 2004 custom functoid assemblies require the Guid attribute and the inclusion of InteropServices:

using System.Reflection;

using System.Runtime.CompilerServices;

using System.Runtime.InteropServices;

[assembly: Guid("299CB34B-2AAF-42e0-9F41-F3626141A1E6")]

[assembly: AssemblyTitle("DBFunktoids")]

[assembly: AssemblyDescription("Funktoids to support stored proc calling")]

If you forget this little gem, your functoids will NEVER show up on the tool palette. Never ever. Take my word on that one.

Also note that the BizTalk Server 2004 BaseFunctoid class does not support HasSideEffects. This does not effect the functionality of the functoid as much as the way XSLT code is generated by BizTalk. But keep it in mind.

Time To Get Funky

I thought I’d waste some bandwidth and include a few screenshots of the functoids in action. These shots were generated from the Funky Microsoft BizTalk Server 2004 project.

This is the map I used. It maps a simple schema to itself using a sample file I created (so one of the arguments would match an employee in the Northwind database). Make sure you have Northwind installed in your database before you run the sample (or change the proc to something else).

 

The picture below shows the configuration for the stored procedure runner funktoid. Make sure you change the connection string to match your environment and grant appropriate privileges using accepted security best practices blah blah blah.

 

 

To test the Error Extraktor, add a couple X's to the stored procedure name so that it fails, run the map, then take a look at the output and welcome to Exception City, population you.