IPipeline::Execute Method [transacted]

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

Use this method to run the stages in the pipeline configuration file, which was previously specified by the LoadPipe method.

HRESULT IPipeline::Execute(
  long lMode,
  IDispatch* pdispOrder,
  IDispatch* pdispContext,
  Long lFlags,
  long* pErrorLevel
);
Function Execute(
    lMode As Long,
    pdispOrder As Object,
    pdispContext As Object,
    lFlags As Long
) As Long

Parameters

  • lMode
    [C++]

    [in] A long indicating the mode in which to run the pipeline. This parameter is provided only for backward compatibility with Site Server 2.0 sites. For Commerce Server 2000 and later, use a value of one (1). A value of zero (0) will prevent the pipeline from executing.

    [Visual Basic]

    A Long indicating the mode in which to run the pipeline. This parameter is provided only for backward compatibility with Site Server 2.0 sites. For Commerce Server 2000 and later, use a value of one (1). A value of zero (0) will prevent the pipeline from executing.

  • pdispOrder
    [C++]

    [in] A pointer to the IDispatch interface of a Dictionary object. The Order dictionary that will be used by the pipeline, usually an OrderForm object.

    [Visual Basic]

    A reference to a Dictionary object. The Order dictionary that will be used by the pipeline, usually an OrderForm object.

  • pdispContext
    [C++]

    [in] A pointer to the IDispatch interface of a Dictionary object. The Context dictionary that will be used by the pipeline.

    [Visual Basic]

    A reference to a Dictionary object. The Context dictionary that will be used by the pipeline.

  • lFlags
    [C++]

    [in] An unused long integer parameter. Must be set to zero (0).

    [Visual Basic]

    An unused Long parameter. Must be set to zero (0).

  • pErrorLevel
    [C++]

    [out,retval] A pointer to a long that returns the error level.

Return Value

[C++]

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

[Visual Basic]

None.

Error Values

[C++]

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.

[Visual Basic]

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.

In addition, the pErrorLevel parameter is set to one of the following three values:

In addition, the method returns one of the following three values:

Value

Description

1

Success. The pipeline ran successfully.

2

Warning. Generally, these are basket or user errors that would be reported to the user through the ASP page.

3+

Failure. A pipeline component failed to run.

Remarks

[C++]

The pErrorLevel parameter points to valid data only if the method completed successfully.

Example

' pMtsTxPipeline is a MtsTxPipeline object
' dOrder and dContext are Commerce.Dictionary objects

errVal = pMtsTxPipeline.Execute(1, dOrder, dContext, 0)

See Also

Other Resources

MtsTxPipeline Object

IPipeline::LoadPipe Method [transacted]

IPipeline::SetLogFile Method [transacted]