What is the Run VBScript Tool?
The Run VBScript tool is used to create a task step that runs a Visual Basic Script using data produced by other steps in the task.
The step also provides access to the Memory feature which allows data produced by the step to be memorised into a Repository.
Run VB Script Tool Features
- Copy-and-paste script into the editor from external documents.
- Drag-and-drop common scripts from the Reference tab of the Task Browser dialog.
- Memory feature to memorise task data created at run-time.
Run VB Script Tool: Working with other Tools
The Run VBScript tool can directly interact with the following tools:
Consuming from Other Tools
The Run VBScript tool can consume objects exposed by the following tools:
Icon | Tool Name | Tool Category |
---|---|---|
Database Query (ODBC) | Input and Data Connectors | |
Database Query (OLEDB) | Input and Data Connectors | |
Import Flat File | Input | |
Convert XML to Recordset | Format | |
Create Workflow Job | Format | |
Format as Flat File | Format | |
Format as HTML | Format | |
Format as HTML Pro | Format | |
Format as Text | Format | |
Run Crystal Report | Format | |
Run Microsoft Reporting Services | Format | |
Run Microsoft Word (Merge) | Format | |
Filter Data | General |
Objects Consumed
The following objects, outputted by the above tools, can be consumed by the Run VBScript tool:
- Recordset — Tabular data from any BPA Platform tool capable of exposing such data (see above)
- Documents (Text) — Plain text documents
- Documents (HTML) — Standalone HTML pages
- Documents (Paged HTML) — Paginated HTML files
- Documents (PDF)
- Documents (RTF) — Rich text documents
- Documents (XML)
- Documents (CSV)
Exposing to Other Tools
As an Output category tool, Run VBScript does not expose any objects that can be directly consumed by another tool. However, it does expose the following objects which can be used in a task step sequence:
- RecordSource — If an Input Recordset has been selected, this contains the columns included in the recordset
- DocumentSource — If a Document Source has been selected, this contains the data in the document as recordset columns
- Memory Definitions — If configured, this is a list of Memory Definitions created for the step and the recordset columns to be memorised for each one
- Step Properties — Standard step properties are available allowing you to use statistical data of the tool
Run VB Script Tool: Step Configuration
To add a new Run VBScript step to an existing task, you either:
- Click and drag the Run VBScript icon from the Task Browser to the task Design area.
- From the task’s Design tab, right-click on empty space and select Add > Execute > Run VBScript.
For a detailed description of how to create new tasks, refer to the product help.
About the General Tab
The General tab is used to enter the following details for the step:
- Name — Enter a meaningful name for the stepTIP: If this task instance makes use of two or more Run VBScript steps, ensure the Name used is unique for each individual step.
- Description — If required, enter a description of this step
- Use a Recordset — Enable this parameter if recordset data from a previous task step is required when running the script
- Input Recordset — Contains all available recordsets from steps previously created in the task
- Read documents from a source — Enable this parameter if document data from a Format task step is required when when running the script
- Document Source — Contains all available documents from Format steps previously created in the task; note that the document format is displayed after the step name
About the Main Tab
The Main tab is used to enter the Visual Basic (VB) script for the step.
Enter the script in the text input area. Variables, properties, recordset columns, and so on can be dragged and dropped into the script from the Task Browser. Use Check Syntax for any errors that may be in the script — results are displayed in the box underneath your script.
Use Memory to memorise some or all of the step output for use in other task steps. This is particularly useful when the Run VBScript step is called multiple times — use Memory to compare the record previously processed to the new record currently being processed to avoid duplicates.
About the Options Tab
The Options tab allows you to define how errors in this step are handled at task runtime.
If an error occurs, you can decide whether the step should Continue processing, or terminate the step immediately (Abort Step).
If the step is aborted, you can choose to Continue processing onto the next step in the task, or terminate the whole task immediately (Abort Task).
If Run memory provider(s) after VB Script execution is enabled, then configured memory providers are run after script execution.