OrderGroup.RunPipe

Ee825057.c++_on(en-US,CS.10).gifEe825057.vb_off(en-US,CS.10).gif

Use this method to run the Pipeline Component File on each OrderForm in the OrderGroup object.

Definition

Function RunPipe(strPCF As String,strPipelineProgID As String,oContext As Object) As Long

Parameters

strPCF

A String that specifies the Pipeline Component File file path (for example, c:\SampleDir\SampleFile.pcf).

strPipelineProgID

A String that specifies the pipeline ProgID.

oContext

An object reference that specifies the pipeline context.

Return Values

If this method completes successfully, it returns a Long that specifies the maximum error level encountered by the pipeline runs.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

When OrderGroup.RunPipe is called, the OrderGroup object instantiates and runs the pipeline for each of its contained OrderForms. The pipeline objects themselves continue to be passed a regular OrderForm, as if they were run in a stand-alone pipeline. In fact, a pipeline component has no way of knowing whether it is running on an OrderForm within an OrderGroup, or on a stand-alone OrderForm.

There are cases where you want the pipeline component to know about all items in the OrderGroup, regardless of whether those items are from differing vendors (ie a discount component). If this is the case, you should not use the multiple-OrderForm feature of the OrderGroup object (adding all items to the same OrderForm). In these cases, you can use the Splitter pipeline component to produce views of items from different vendors on your OrderForm.

When calling OrderGroup.RunPipe, you can rely on the aggregation features of the OrderGroup to produce grand totals across all OrderForms. OrderGroup.RunPipe automatically aggregates many common fields. If you wish to aggregate additional fields, use OrderGroup.AggregateOrderformValues.

Additionally, this method computes grand totals across each OrderForm for each of the following properties:

Orderform Value Grand Total on the OrderGroup
_cy_oadjust_subtotal saved_cy_oadjust_subtotal
_cy_total_total saved_cy_total_total
_cy_shipping_total saved_cy_shipping_total
_cy_handling_total saved_cy_handling_total
_cy_tax_total saved_cy_tax_total
_cy_tax_included saved_cy_tax_included

Many pipeline keys are prefixed by "_", which by default means they will not be persisted to the database. Occasionally, you may want to take snapshots of these keys, and by convention, the prefix "saved_" is used in this situation. By using the "saved_" prefix they can be referred to later and can be searched via SQL statements or the OrderGroupManager object. Copied keys should not necessarily be trusted as being up-to-date. Also, they should not be used by pipeline components directly.

The OrderGroup object has a LogFile property that can be used to set the log file for the RunPipe method.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' oOrderGroup is a Commerce.OrderGroup object
' lResult is a long
' oContext specifies the pipeline context 
lResult = oOrderGroup.RunPipe("c:\myPCFFile.pcf", _
    "Commerce.PooledPipeline, oContext)

See Also

Pipeline Basics

OrderGroup Object

OrderGroup.LogFile


All rights reserved.