Sdílet prostřednictvím


How to Run a Pipeline

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Pipeline components are COM objects that perform a particular task and operate on business objects, such as an OrderForm or Dictionary object. Pipeline components may be customized and added to pipeline configuration files through the Pipeline Editor.

Pipeline Configuration Files

Pipeline configuration files (.pcf) determine the order in which pipeline components are run and may provide configuration information to the components in the pipeline. Pipeline configuration files can be created and edited in the Pipeline Editor by opening a pipeline configuration template and saving it as a pipeline configuration file.

Pipeline configuration files are broken into two main categories: Order Processing pipelines (OPPs) and Content Selection pipelines (CSPs). Order Processing pipelines model the workflow for processing an order, breaking it down into discrete tasks. Content Selection pipelines are responsible for targeted content delivery of ads and discounts. In addition to OPPs and CSPs, there is one other type of pipeline, the Direct Mailer pipeline, used only by the Direct Mailer service.

Configuring a Pipeline

Before you can run a pipeline, you must provide a configuration entry in the Web.config file of the application in which the pipeline will be run. Such entries use the pipeline element, one or more of which can occur within the pipelines element. The following example defines a non-transacted order pipeline named "basket", with the specified pipeline configuration file and logging disabled.

<pipeline name="basket" path="pipelines\basket.pcf" transacted="false" type="OrderPipeline" loggingEnabled="false"/>

Running a Pipeline

When your application needs to perform some processing that is implemented as a pipeline, you run the pipeline by calling the RunPipeline method of the pipeline component and pass in an instance of the PipelineInfo class. You create the PipelineInfo instance for the OrderPipelineType that you need, such as Basket, Total, Checkout, and so on.

The following code shows how to run a basket pipeline, where myBasketPipelineis the name of your basket pipeline component:

basketPipeInfo = new PipelineInfo("basket");
myBasketPipeline.RunPipeline(basketPipeInfo);

See Also

Other Resources

Orders System Pipelines