- Click the
icon in either the property or task step tree pane depending on the portion of the task step you are scripting.
Alternatively, you can access the script editor from the Step menu. Select Advanced and then choose Add Navigation Script.
- In the Script window, enter the script needed to handle the selected phase of the task execution. To create additional methods and inner classes for use with your script, use the Helper Methods panel of the script editor.
To aid in writing your script, use the advanced Java options, by clicking the appropriate node on the navigation pane of the script editor.
Use this option
|
To do this
|
Global Members |
Declare the constants and variables you want to use in your script. |
Helper Methods |
Declare the helper methods, including method declarations that you want to use in your script. |
Imports |
Add or remove the class and package imports that are needed by your script. |
Project Resources |
Add or remove the external JARs you need to complete your script. The resources added here are available to all scripts used in the project. |
Also, a list of variables, visible by default in the top pane of the editor, is available for you to use in your script. These variables are links to their appropriate Javadocs. Click Hide tips to remove the usage tips from the editor. You can display them by clicking Show usage tips at any time.
- Verify your script. The script editor, when it verifies script, checks the syntax of enabled script for possible errors. All script must verify successfully or be disabled before it can be used in your task step.
There are two methods available to verify your script:
This method
|
Does this
|
Click Verify Script |
Verifies your script without saving it. If the verification is successful, a message displays in the top pane of the editor. |
Click OK |
Verifies your script, saves the changes, and dismisses the script editor. |
If verification errors occur, address each error by selecting it, and modifying the script. You can page through all the errors by clicking the navigation arrows in the top pane of the editor. You must either correct all errors or disable the offending portions of the script before you can save your script.
|