_OrderGroup::RunPipe

Ee825056.c++_off(en-US,CS.10).gifEe825056.vb_on(en-US,CS.10).gif

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

Definition

HRESULT _OrderGroup::RunPipe(BSTRstrPCF,BSTRstrPipelineProgID,IDispatch*oContext,long*lpRetVal);

Parameters

strPCF

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

strPipelineProgID

[in] A BSTR that specifies the pipeline ProgID.

oContext

[in] A pointer to the IDispatch interface that specifies the pipeline context.

lpRetVal

[out, retval] A pointer to a long used to return the maximum error level encountered by the pipeline runs.

Return Values

This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return 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.

The lpRetVal parameter points to valid data only if the method completes successfully.

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

See Also

Pipeline Basics

OrderGroup Object

_OrderGroup::get_LogFile, put_LogFile


All rights reserved.