MtsPipeline.Execute Method
The Execute method runs the specified set of stages in the pipeline, applying their actions to the specified object. Before invoking Execute, you must load the pipeline configuration using the LoadPipe method.
Execute returns a Long result containing one of the following values:
-
υA result of 1 indicates the pipeline executed successfully.
-
υA result of 2 indicates errors raised by pipeline components in the basket or purchase error collections. These are typically customer errors, such as a mis-typed credit-card number. An error message is displayed to the customers so that they can submit the information again.
-
υA result of 3 indicates failure of the pipeline, such as the inability to access the database. This type of error cannot be corrected by the customer. (If calling the Execute method from within Microsoft® Visual Basic or Visual Basic Scripting Edition, the return value is not set in the case of failure. If you are using On Error Resume Next, check the Err object for errors, and check the return value for warnings. Do not call On Error Goto 0 before checking the status of the Err object, because this call clears it.)
Syntax
MtsPipeline.Execute(Mode, Object, PipeContext, Reserved)
Parameters
-
Mode
-
Specifies the mode in which to execute the stages in the pipeline. This parameter may be set to one of the following:
1 Runs the product verification stages (OPPMODE_PRODUCT).
2 Runs all stages except payment and accept (OPPMODE_PLAN).
4 Runs the complete pipeline (OPPMODE_PURCHASE).
Note
The Mode parameter is included only for backward compatibility with sites created in Commerce Server 2.0, and will be discontinued in future releases. In Commerce Server 3.0 and later, the selection of pipeline stages is made by loading an appropriate pipeline configuration file with the LoadPipe method. Commerce Server 3.0 applications should use the value one (1) for this parameter (zero (0) will cause no stages to run).
-
Object
-
The data object to be processed by the components in the pipeline. For an OPP, Object is usually an initialized OrderForm. For a CIP, Object is a transport dictionary used to store various properties during the execution of the pipeline.
-
PipeContext
-
The PipeContext object is a Dictionary object that references a group of initialized objects containing information needed by the pipeline.
-
Reserved
-
This value is not used and must be set to zero (0).
Remarks
The Execute method should be used instead of the RunProduct, RunPlan, and RunPurchase methods on the Page object, as used in Commerce Server 2.0.
Example
For an example of this method, see MtsTxPipeline and MtsPipeline Overview.
Related Topics
© 1997-1998 Microsoft Corporation. All rights reserved.