The BizTalk Adapter Framework handles a lot of the configuration baggage for adapters automatically using property grids and an annotated XSD schema provided by the adapter management classes. Besides this, the framework allows the developer to customize how a configuration property is edited in the property grid by including annotations in the configuration XSD that inject custom type editors or custom type converters.

The Adapter Framework schema (BizTalkAdapterFramework.xsd [1]) also provides some initial editors one can use by simply setting the type of the configuration element to the correct value. One new type that appears to have been introduced in BizTalk Server 2006 is baf:FolderName, which uses the standard Windows Folder Picker dialog to select a file system directory. Pretty useful for properties that must reference a folder name! Here's how to use it:

xml version="1.0" encoding="utf-16"?>
<xs:schema
elementFormDefault="qualified"
id="ReceiveLocation"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:baf="BiztalkAdapterFramework.xsd">
<xs:import namespace="BiztalkAdapterFramework.xsd" />
<xs:element name="Config">
<xs:complexType>
<xs:sequence>
...
<xs:element name="OutputDirectory" type="baf:FolderName"/>
..
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

This seems like a good complement to the baf:FileName type that already existed in BizTalk 2004, which used the WIndows File Open dialog.

[1] For the curious, this schema is embedded as a resource inside the Microsoft.BizTalk.Adapter.Framework.dll assembly.

Technorati tags: ,


Tomas Restrepo

Software developer located in Colombia.