Configuring a Scriptor Component
The script run by a Scriptor component can be stored internally, as part of the .pcf file, or externally, in a separate file that is called by the component when it runs.
You can write a general-purpose script that can behave differently depending on the parameters that are passed to it. Save the script itself in a file, and then configure the Scriptor component to pass the parameters.
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).
To configure a Scriptor component
-
In the Pipeline Editor, open the pipeline.
-
Do one of the following, depending on which version of the Pipeline Editor you are using:
-
υIn the Win32-based Pipeline Editor, right-click the Scriptor component you want to configure, click Properties on the shortcut menu, and then click the Scriptor tab.
-
υIn the ASP-based Pipeline Editor, locate the Scriptor component you want to configure, and then click its Edit link.
-
For Scripting Engine, select the language in which the script is written.
-
For Source, do one of the following:
-
υTo store the script in the .pcf file, click Internal. In the Win32-based Pipeline Editor, click Edit, and then either type or paste the script into the Source Code Edit dialog box. Click OK. In the ASP-based Pipeline Editor, either type or paste the script into the Script box.
-
υTo store the script in an external file, click External. Type the path and file name in the Filename box. (In the Win32-based Pipeline Editor, you can also click the Browse button to locate the file.)
-
To pass parameters to the script, type the parameters in the Config box.
Parameters must be in the form name=value.
-
In the Win32-based Pipeline Editor, click OK. In the ASP-based Pipeline Editor, click Update.
To convert a Scriptor between external and internal in the Win32-based Pipeline Editor
-
In the Win32-based Pipeline Editor, open the pipeline.
-
Right-click the Scriptor component you want to configure, click Properties on the shortcut menu, and then click the Scriptor tab.
-
For Source, do one of the following:
-
υTo convert to Internal storage if the Scriptor has already been configured for an External file, click Internal, and then click Yes to confirm that you want to import the external file.
-
υTo export an Internal script to an external file if the Scriptor has already been configured for Internal, click External, and then click Yes to confirm that you want to export the internal file. Specify a name for the external file, and then click Save.
-
Click OK.
Related Topics
© 1997-1998 Microsoft Corporation. All rights reserved.