Partager via


Error Handling in Pipelines

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

Error handling during pipeline execution revolves around the interaction of the Order Processing pipeline (OPP) with the OrderForm object, the pipeline objects (MtsPipeline Object, MtsTxPipeline Object, PooledPipeline Object, PooledTxPipeline Object) and the MessageManager Object.

The OrderForm object provides a detailed, in-memory summary of one or more shopping sessions that includes merchant, user, and item information. You pass a dictionary that represents anOrderForm object to the OPP by calling the RunPipeline method.

As the OrderForm dictionary completes various stages of the OPP, the components in each stage read and write values from and to the OrderForm dictionary.

For error processing in your site code, the critical members of the Order Form -- both the object representation and the dictionary representation -- are its _Basket_Errors and _Purchase_Errors collections. These collections store strings describing error conditions that the OPP detects while processing other elements of the OrderForm dictionary.

You use the _Basket_Errors collection to indicate inconsistencies in the order form data that should be noted when the basket is displayed. Basket errors are specific to items in the basket. You use basket errors to make the customer aware of any such problem as soon as possible. One such error is that the price of a product as shown in the basket does not match the price as listed in the product database. This error might occur, for example, if the price changes between the time the customer puts the item in the basket and the time the customer completes the purchase.

The Purchase_Errors collection applies to the order as a whole. You use this collection to indicate failures in the purchasing process, such as denial of a credit card. Purchase errors are discovered only when the customer tries to make the purchase.

See Also

Other Resources

Order Processing Pipelines