Previous in Contents Next in Contents

Scriptor

This Scriptor component, which can be used in any stage of a pipeline, executes a script written in a Microsoft® ActiveX® scripting language such as JavaScript™ or Microsoft® Visual Basic® Scripting Edition (VBScript).

You can run the Scriptor component in any stage of a pipeline.

Remarks

Note  The MSCSExecute function must return a success code. If you write a Scriptor component in VBScript, the MSCSExecute routine must be a function, not a subroutine (see the following examples). This is because MSCSExecute must return a success value of 1, a warning value of 2, or a failure value of 3. Subroutines cannot return 1. If you write the function in JavaScript, be sure to return a value.

The script that is executed by the Scriptor component consists of a group of entry points. These include the following:

The MSCSOpen handler. This function is invoked first when the Scritpor component is run.

The MSCSExecute handler. This is the main Scriptor entry point. This handler is passed the OrderForm, the pipe context, and optional configuration parameters.

The MSCSClose handler. This handler is invoked after the MSCSExecute handler has returned.

If you include the Scriptor component in a pipeline that you run using the MtsTxPipeline, you should not call the ObjectContext object's methods from within the MSCSOpen or MSCSClose handlers. Calls to ObjectContext methods can only occur from within the Scriptor's MSCSExecute handler.

Note  The Microsoft Transaction Server (MTS) context is not available to a Scriptor component or to any components called by a Scriptor (that is, context.SetComplete() and context.SetAbort() are not available to scripts hosted by Scriptor).

Related Topics

·Using the Scriptor Component

·The Scriptor Methods

·Configuring a Scriptor Component


© 1997-2000 Microsoft Corporation. All rights reserved.