CHAPTER 7
Pipelines are powerful BizTalk artifacts used to standardize inbound and outbound messages for pre-processing in receive ports or post-processing in send ports (for example, as parsing operations, validations, or schema evaluation before storing a message in MessageBox or sending a message to external systems or to a destination system). BizTalk divides pipelines into two distinct types: receive pipelines and send pipelines. These two types of pipelines differ from each other in the number of stages they have.
A receive pipeline has four different stages:

Receive Pipeline
Send pipelines will make the opposite of receive pipelines, making any post transformation processing’s needed before sending it. If for instance your trading-partner requires a Flat File, BizTalk must transform its internal XML message format to this expected one. These pipelines consist of three stages:

Send Pipeline
At this point you might be asking yourself why have I been talking about available components to use in these stages. This is because it’s you as a developer that is responsible for developing any custom pipelines if needed, as BizTalk only brings four default pipelines to use in receive and send Pipelines, and these are meant for simple scenarios. They are the following:
PassThruReceive
This is a Pipeline meant to be applied to a receive port, and has no component in it. You can see an example of this Pipeline structure in Figure 47. It allows any message to enter your port without any processing.
XML Receive
This is a Pipeline meant to be applied to a receive port and has only the XML Disassembler and the Party Resolution component. This is a nice Pipeline for starts as it disassembles your XML input (must be XML) and evaluates which partners will receive it.
PassThruTransmit
This is a Pipeline meant to be applied to a send port and as no component in it. You can see an example of this Pipeline structure in Figure 48. Allsow any message to be sent through your port, and without any processing.
XML Transmit
This is a Pipeline meant to be applied to a send port, and has only the XML Assembler. If you are sending an XML document through your port without any post processing, keep in mind that BizTalk internal message format in XML, so a PassThruTransmit pipeline will be enough for you.
These Pipelines will become available when you start configuring your physical ports in the BizTalk administrator.

Available pipelines in BizTalk Administrator
Developing custom pipelines is about adding components from those available in the Pipeline Editor to the available stages, according to your pipeline type (receive or send). To start creating your own pipelines, right-click in your project in Visual Studio, select Add, New Item, and select Receive Pipeline or Send Pipeline, according to your development needs. After that, BizTalk will show you the Pipeline Editor.

Pipeline Editors
In the toolbox, you will find all the components we have already talked about. To add them to their corresponding stage, just drag and drop them to the appropriate stage. After you drop the component, the stage will appear as shown in Figure 50.

Pipeline Stage