Scripts can be used to customize operations within a particular flow, and they are saved with that flow. For example, you might use a script to specify a particular run order for the terminal nodes within a flow. You use the flow properties panel to edit the script that is saved with the current flow.
To access scripting in a flow's properties:
- Right-click in your flow's canvas and select Flow properties.
- Click the Scripting tab to work with scripts for the current flow.
You can specify whether or not the script runs when the flow runs. To run the script each time the flow runs, respecting the run order of the script, select Run the script. This setting provides automation at the flow level for quicker model building. Or, to ignore the script, you can select the option to only Run all terminal nodes when the flow runs.
The script editor includes the following features that help with script authoring:
- Syntax highlighting; keywords, literal values (such as strings and numbers), and comments are highlighted.
- Line numbering.
- Block matching; when the cursor is placed by the start of a program block, the corresponding end block is also highlighted.
- Suggested auto-completion.
A list of suggested syntax completions can be accessed by selecting Auto-Suggest from the context menu, or pressing Ctrl + Space. Use the cursor keys to move up and down the list, then press Enter to insert the selected text. To exit from auto-suggest mode without modifying the existing text, press Esc.