Share via


Pipeline Interfaces

Even though you add the [ComponentCategory(CategoryTypes.CATID_Any)]

attribute to your custom pipeline that does not mean that if you put your pipeline into any stage that it will still be executed.  There are two levels of functionality that need to be understood when implementing and using custom pipelines.  The first are the attributes used to decorate the class.  These options are

 

Component category Stage Description
CATID_Decoder Decode The component can be placed in the Decode stage
CATID_DisassemblingParser Disassemble The component can be placed in the Disassemble stage.
CATID_Validate Validate The component can be placed in the Validate stage.
CATID_PartyResolver ResolveParty The component can be placed in the ResolveParty stage.
CATID_Encoder Encode The component can be placed in the Encode stage.
CATID_AssemblingSerializer Serialize The component can be placed into the Serialize stage.
CATID_Any Any of these stages The component can be placed into any stage of a pipeline.

 

In many of the samples that I have seen, the CategoryTypes.CATID_Any type is used.  All that this means is that from the pipeline designer standpoint, your custom pipeline can be dragged to any of the stages.  However, just because you can drag your pipeline to any stage does not mean that it will be executed.  Each type of pipeline (general, assembling and disassembling) has an associated interface that must be implemented in order for the pipeline to be plugged in to the Messaging Engine.

 

This is the where the second part comes into play.  When you created your custom pipeline you implemented a number of interfaces.  When the BizTalk Messaging Engine looks at your pipeline it probes to see what interfaces you have implemented.  So, lets say you have used the CATID_Any and placed your pipeline on a receive pipeline in the Disassemble stage but didn't implement the IDisassemblerComponent interface, your custom pipeline will not be called.  Everything will compile and deploy but if you want to debug your custom code, Visual Studio will place question marks on your breakpoints after you attach to the BTSNTSvc.exe process.  If you hover over the question marks you will get a message stating that no symbols have been loaded and your breakpoint will not get hit.

 

By placing the same component in the Validate stage then the custom pipeline will run with no modifications.  When creating a general pipeline component, they can be placed in the Decode, Encode, Pre-assemble, ResolveParty or Validate stage.

Comments