BizTalk 2009 - Pipeline Component Wizard
- by Stuart Brierley
Recently I decided to try out the BizTalk Server Pipeline Component Wizard when creating a new pipeline component for BizTalk 2009.
There are different versions of the wizard available, so be sure to download the appropriate version for the BizTalk environment that you are working with.
Following the download and expansion of the zip file, you should be left with a Visual Studio solution. Open this solution and build the project.
Following this installation is straight foward - locate and run the built setup.exe file in the PipelineComponentWizard Setup project and click through the small number of installation screens.
Once you have completed installation you will be ready to use the wizard in Visual Studio to create your BizTalk Pipeline Component.
Start by creating a new project, selecting BizTalk Projects then BizTalk Server Pipeline Component. You will then be presented with the splash screen.
The next step is General Setup, where you will detail the classname, namespace, pipeline and component types, and the implementation language for your Pipeline Component.
The options for pipeline type are Receive, Send or Any.
Depending on the pipeline type chosen there are different options presented for the component type, matching those available within the BizTalk Pipelines themselves:
Receive - Decoder, Disassembling Parser, Validate, Party Resolver, Any.
Send - Encoder, Assembling Serializer, Any.
Any - Any.
The options for implementation language are C# or VB.Net
Next you must set up the UI settings - these are the settings that affect the appearance of the pipeline component within Visual Studio.
You must detail the component name, version, description and icon.
Next is the definition of the variables that the pipeline component will use. The values for these variables will be defined in Visual Studio when creating a pipeline.
The options for each variable you require are:
Designer Property - The name of the variable.
Data Type - String, Boolean, Integer, Long, Short, Schema List, Schema With None
Clicking finish now will complete the wizard stage of the creation of your pipeline component.
Once the wizard has completed you will be left with a BizTalk Server Pipeline Component project containing a skeleton code file for you to complete.
Within this code file you will mainly be interested in the execute method, which is left mostly empty ready for you to implement your custom pipeline code:
#region IComponent members
/// <summary>
/// Implements IComponent.Execute method.
/// </summary>
/// <param name="pc">Pipeline context</param>
/// <param name="inmsg">Input message</param>
/// <returns>Original input message</returns>
/// <remarks>
/// IComponent.Execute method is used to initiate
/// the processing of the message in this pipeline component.
/// </remarks>
public Microsoft.BizTalk.Message.Interop.IBaseMessage Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
{
//
// TODO: implement component logic
//
// this way, it's a passthrough pipeline component
return inmsg;
}
#endregion
Once you have implemented your custom code, build and compile your Custom Pipeline Component then add the compiled .dll to C:\Program Files\Microsoft BizTalk Server 2009\Pipeline Components .
When creating a new pipeline, in Visual Studio reset the toolbox and the custom pipeline component should appear ready for you to use in your Biztalk Pipeline.
Drop the pipeline component into the relevant pipeline stage and configure the component properties (the variables defined in the wizard).
You can now deploy and use the pipeline as you would any other custom pipeline.