OrderGroup.RunPipe Method (PIA)

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

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Orders
…
Public Function RunPipe(strPCF As String,
  strPipelineProgID As String,
  oContext As Object) As Integer

[C#]

using Microsoft.CommerceServer.Interop.Orders;
…
public int RunPipe(stringstrPCF,
  stringstrPipelineProgID,
  objectoContext);

Parameters

[Visual Basic .NET]

  • 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.

[C#]

  • 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 that contains the pipeline context.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns an Integer that specifies the maximum error level encountered by the pipeline runs.

[C#] This method returns an int indicating the maximum error level encountered by the pipeline runs.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

When OrderGroup.RunPipe is called, the OrderGroup object instantiates and runs the pipeline for each of its contained OrderForm objects. 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 object, regardless of whether those items are from differing vendors (for example, 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 object.

When calling OrderGroup.RunPipe, you can rely on the aggregation features of the OrderGroup object 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 object 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 might want to take snapshots of these keys, and by convention, the prefix "saved_" is used in this situation. Using the "saved_" prefix allows you to refer to these keys later and to search them by using SQL statements or the OrderGroupManager object. Copied keys should not 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.

[Visual Basic .NET]

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)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Orders

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Interop.Orders.Requisition.dll

See Also

Pipeline Basics

OrderGroup Class

OrderGroup.LogFile

Copyright © 2005 Microsoft Corporation.
All rights reserved.