Martijn's blog - E-Commerce, EAI, BizTalk and .NET

2006/01/25

BizTalk Server 2006 - Pipeline Component Side-By-Side deployment

In BizTalk Server 2004, it was impossible to perform a side-by-side deployment of pipeline components (if someone knows an approach to implement this without renaming the assembly, please let me know ;-) ). Every aspect of BizTalk Server components was deployed into the GAC, but the pipeline components themselfs.

It turns out, however, the team did a tremendous job in altering this 'feature' to support GAC-ed pipeline components within BizTalk Server 2006. The trick to enable this is to:

  • Version the pipeline component (sign the assembly)
  • reference the component by placing it into the "Pipeline Components" folder at development time in order to use it in your pipelines
  • remove it from this folder after building the pipeline or in deploying your solution to production
  • GAC the component
The compiled pipeline assembly will reference the correct version and the AppDomain used by BizTalk Server 2006 will search the GAC before resorting to it's private paths, amongst which is the "Pipeline Components" folder.

2006/01/21

Using the BRE in content-based routing scenarios

After writing Schema Editor extensions, I got the idea of creating a Pipeline Component which can be used in content-based routing scenarios. Also, I've attached a 'whitepaper' which explains the sample solution as well as the IExtension interface used to implement the Schema Editor extension. The idea is simple:

  • A message comes into / flies out of the system through a Pipeline;
  • The Pipeline contains a component which looks at the schema for the passing message;
  • The Schema contains an annotation which states the Policy that applies to the Schema;
  • The appropriate Policy is executed by calling the BRE;
  • The Policy alters the message;
  • The message flying by is modified to contain the altered message from the BRE.
After this, any following component or system will deal with the altered message.

One thing I haven't implemented due to the fact I haven't currently got a BizTalk 2004 VPC image is AppDomain caching of the Schema lookup. This caching would greatly improve performance of the Pipeline Component.

The associated whitepaper can be downloaded here. The source code is here.

2006/01/15

BizTalk Server 2006 - export Orchestration as image

The UK SDC BizTalk 2004 Documenter tool, which can be found over here, does an excellent job of generating documentation for BizTalk projects.

However, I often need to take snapshots of my BizTalk Orchestration and I'm currently using BizTalk Server 2006, which the tool doesn't support (yet?). I've written my own 'tool' for this, by stealing, euhm, borrowing, some code from them and throwing some of my own in as well.

It's downloadable here for anyone to use. Sourcecode is included as always.

Have fun using it and let me know if you run into trouble ;-)

2006/01/12

Of BizTalk Server Schema Editor Extensions...

Ever wanted to add your own annotations to your schemas for some purpose like the Flat File extension, property promotion, the HWS extension or the TPM extension does? You can edit the schema by hand, but that wouldn’t be any fun, right? ;-) As an exercise, I’ve created two extensions which can easily be used in Visual Studio and extend the default schema editor, like the flat file extension does.

One of the extensions allows an annotation to be added to the root schema element which can be read somewhere else in order to execute a specific BRE policy belonging to the message. This solution could be used to execute a policy from a pipeline in a content-based routing scenario.

The other extension solves an issue a guy with me on a recent course has in processing COBOL copybooks. He needs to determine whether a field should be treated (and validated) as a date field instead of the normal numeric value. The extension allows for adding a property on any field stating it’s a date field according to the COBOL copybook standards.

Figuring out how and what with schema extensibility can be a daunting task, as documentation is scarce. If you end up developing with these extensions, look into these properties, as there are not used, but very interesting (and hopefully, self-descriptive):

InstanceGenerator
InstanceValidator
SchemaValidator

Also, note the custom tab on the CopyBookExtension. It stems from a method called by the schema editor called GetCustomViews and the tab shows which fields will be interpreted as a date.

Sourcecode for the CopyBookExtension is here, sourcecode for the BRECallPolicyExtension can be found here.

Using the extension is easy:
  1. Compile the extension. A post-build action will copy the output to the schema editor extension folder of BizTalk
  2. Open up a schema in Visual Studio
  3. Select the extension
  4. In case of the CopyBook extension, select a field and note the “CopyBook” group in the PropertyGrid
  5. In case of the BRECallPolicy extension, select the node and note the “BRE” group having a dropdown list of all published policies (latest only) or the error if nothing is found on the local host BizTalkRuleEngineDb ;-)
Let me know what you think!

2006/01/11

Default values in maps - better option in BizTalk 2006

In a course I'm following today we discussed different ways of keeping nodes from dissapearing after a map has been applied. We discovered a new option in 2006 b2, which I'm very font of. Basically, up until now, we had a few ways (maybe even more?) of ensuring output nodes were created correctly:
  1. default value in schema (space) - drawback: not visible in editor, schema specific, where as we might want to leave some nodes out in other mappings.
  2. space in value in map - drawback: not visible in editor.
  3. use some string functoid to fill the value (empty argument for the functoid) - drawback: non-functional functoids in the map, warning if the datatype is not string.
  4. scripting functoid - ability to return a null value, which works with any datatype on the right hand side. drawback: non-functional functoids in the map
  5. map a record (any record) into the elements or attributes - drawback: clutters the map with non-functional and illegal links.
in 2006 b2, there's a 6th possibility:

The value property of the right hand side map now has a dropdown, containing '<empty>', which greatly enhances the functional aspect of the property.

2006/01/09

Privacy and BizTalk Server 2006 - the "BizTalk Server Operators" group

Coming up in BizTalk Server 2006: the "BizTalk Server Operators" group. Users within this group are unable to view privacy relevant details such as context properties for suspended messages and their message body, which "BizTalk Server Administrators" can... Kudos!