다음을 통해 공유


Format of BizTalk 2004 assemblies: Pipelines

Today, we continue our deep dive into the undocumented and unsupported bowels of the BizTalk artifacts compiler and examine how pipelines get compiled to .NET assemblies. Pipelines allow to adjust the format of inbound messages to something that is suitable for processing. There are two kind of pipelines: Send Pipelines or Receive Pipelines. The following picture shows a composite picture with a receive pipeline (left) and a send pipeline (right) being edited in Visual Studio.

 

It is time to dive a little deeper into the generated class. Compiling any Send or Receive Pipeline and loading it into the excellent Lutz Roeder's .NET Reflector  shows the following:

 

We already know that when a BizTalk project is compiled, Pipelines are compiled to a public sealed class type into a .NET assembly. The class inherits from Microsoft.XLANGs.BaseTypes.PipelineBase (contained in Microsoft.XLANGs.BaseTypes.dll, available in <BTS Installation Directory>). This class is not supported as explained by this page  (look at the bottom of the page). To compile a Pipeline, BizTalk generates and compiles a class close to the following C# class:

namespace <projectName> {

  public sealed class <nameOfPipelineFile> : Microsoft.XLANGs.BaseTypes.PipelineBase {

    public <nameOfPipelineFile>() { }

    public override Guid VersionDependantGuid { get { return new Guid(" <someGuid> "); } }

    public override string XmlContent { get { return " <contentOfBTPFile> "; } }

    // --------------------------------

    // Private const properties not shown go here

    // --------------------------------

  }

}

To simplify, I have omitted the private constant members of the class. All the bold underlined words surrounded by angle brackets are placeholders that have to be replaced by an actual string adequate for the pipeline being compiled. Let look at the properties a little more closely:

  • VersionDependentGuid: Guid of the Pipeline, dependent of the version of the Pipeline.
  • XmlContent: The actual Pipeline definition, as an XML string. This is the content of the .btp file that was produced by the pipeline editor.

The base class Microsoft.XLANGs.BaseTypes.PipelineBase is abstract and contains only the properties outlined above. Alert readers have probably already noticed that the property "XmlContent" appears also on Maps as shown in my previous post . This is not a coincidence. It is used by the BizTalk assembly viewer and other tools to get a representation of the artifact in XML.

Remember that this post contains mostly undocumented, unsupported information. This content is provided "AS IS" and for entertainment purpose only. Further versions of BizTalk may change the ways things get compiled and relying on low level details like the ones outlined before will cause your application to break.