Configuring Script Tasks
You can use Javascript or Groovy scripting languages to add custom scripts that will execute custom commands. Use the Configure Script Task dialog to add your custom scripts to a script task.
To configure a script task:
1. | Right-click a script task shape on the drawing canvas. |
2. | Select Configure Script Task. |
3. | In the Configure Script Task dialog, from the Script Type drop-down list, select the scripting language you want to use (Groovy and Javascript are supported). |
4. | In the Timeout (minutes) field, enter the number of minutes the script will have after execution at runtime to complete before it times out. The default is five minutes. |
5. | Enter your script code in the blank text entry area. |
For help with code syntax, see Using the Script Task.
6. | Click Test Script to ensure that there are no syntax errors. |
An error message displays if the script test fails.
A green check mark is placed next to the Test Script button if it passes the test.
Click the Test Data Panel tab to view the data that is returned when the test on the script runs.
7. | Click the Code Reviewed check box to indicate that the code has been reviewed. |
8. | Click Save or Save & Close. |
Script Task Properties
You can also configure script tasks from the Script Task Properties panel. To open the properties panel, select a script task shape on the drawing canvas, then click the Script Task Properties tab below the canvas.
In the Script Task Properties panel, use the Inputs and Outputs to associate data inputs and outputs with the selected script task shape. For more information, see Configuring Data Inputs and Outputs.
Use the Script Configuration tab to configure the selected script task shape.
XTRAC Community |
![]() |