Script is a flow element that executes a script program specified by the user to process, produce or consume jobs.
A script flow element can be a processor, producer or consumer depending on the specifications in the attached script declaration. In addition, the script declaration may inject extra properties into the script element and into its outgoing connections. These extra properties serve as arguments to the script program.
For more information on scripting in Switch, refer to the Scripting reference.
Keywords can be used with the search function above the Flow Elements pane.
The keywords for the Script element are:
A script package is an archive file (with filename extension "sscript") that contains all information about a script. It includes a script declaration, a script program, and possibly an icon to be displayed in the Switch flow designer instead of the standard script element icon. A script package can be exchanged between users as a single entity.
To assign a new script package (created with SwitchScripter or received from a third party) to a script element, right-click on the script element in the canvas and select the "Choose script package" menu item, or edit the "Script package" property in the properties editor.
To edit the script package selected in a script element, right-click on the script element in the canvas and select the "Edit script package" menu item. The script package will be opened in SwitchScripter for viewing or editing.
The type and maximum number of outgoing connections for a script element are determined by the script declaration attached to the script element. Furthermore, the script declaration may cause the script element to inject extra properties into its outgoing connections.
Property |
Description |
---|---|
Name |
The name of the flow element displayed in the canvas |
Script package |
The Switch script package to be attached to this script element |
<Injected> |
The script declaration may define extra properties to be injected into the script element as arguments for the script program |