MicroPipe implements the Component Object Model (COM) interface IMicroPipeline, which is derived from IDispatch, as the default interface. The MicroPipe also implements the COM interface ISupportErrorInfo.
The MicroPipe object does not explicitly use the Microsoft® Transaction Server (MTS). SetComplete/SetAbort is not explicitly used. If transaction semantics are desired, the page can be marked as transacted or the standard MtsTxPipeline can be used. Distributed transactions have no meaning in the scope of the MicroPipe because it contains only one component.
The way in which you call the MicroPipe object from a page depends on the pipeline component. Each pipeline component has a private way to set its component configuration from the component’s administrative property pages. Two common ways are:
Other pipeline components may have different methods for providing input to the component. The MicroPipe supports all methods of setting the configuration of a pipeline component.
The following example demonstrates how to use the MicroPipe with an order processing pipeline (OPP) component that is configured with a dictionary. This example is written in Microsoft® Visual Basic® Scripting Edition (VBScript). This example executes the component MyPipelineComponent
from the page:
REM Create orderform and pipecontext objects
set orderForm = Server.CreateObject("Commerce.OrderForm")
Set pipeContext = Server.CreateObject("Commerce.Dictionary")
Set pipeContext("MessageManager") = MSCSMessageManager
Set pipeContext("DataFunctions") = MSCSDataFunctions
Set pipeContext("QueryMap") = MSCSQueryMap
REM Create a dictionary for input values
config_dictionary = Server.CreateObject(Commerce.Dictionary)
config_dictionary.componentsize = 17
config_dictionary.componentcolor = blue
config_dictionary.componentpattern = striped
REM Create the object to be executed
component = Server.CreateObject(MyPipelineComponent)
REM Set its values using the dictionary
Call component.SetConfig(config_dictionary)
REM Create the Micropipe and specify the component to execute
MicroPipe = Server.CreateObject("Commerce.MicroPipe")
Call MicroPipe.SetComponent(component)
REM Run the component
ErrorLevel = MicroPipe.Execute(orderForm, pipeContext, 0)
REM Clean up objects
set MicroPipe = nothing
set component = nothing
set config_dictionary = nothing
set pipeContext = nothing
The following example demonstrates how to use the MicroPipe from an ASP page with a pipeline component that is configured by setting properties. This example is written in Visual Basic Scripting Edition:
REM Create the object to be executed
component = Server.CreateObject( MyPipelineComponent )
REM Configure its values
component.componentsize = 17
component.componentcolor = blue
component.componentpattern = striped
REM Create the Micropipe and specify the component to execute
MicroPipe = Server.CreateObject("Commerce.MicroPipe")
Call MicroPipe.SetComponent(component)
REM Run the component
ErrorLevel = MicroPipe.Execute(orderForm, pipeContext, 0)
REM Clean up objects
set MicroPipe = nothing
set component = nothing