Script Parameters

The parameters required by a script are specified using comments in the header. These are similar in format to the JavaDoc comments used to document Java.

The minimum that can be specified to define a parameter is the name; for example, @param sourceLanguage.

This assumes that the input is a simple string and displays an (initially empty) text box on the UI.

Optional: An @inputType line enables more specific data input methods:

Input types can be given a default value using @defaultValue. The @defaultValue of file_picker type is the fully qualified path and name; for example,

/Administration/Impact Manager/Script Repository/SortDataModelTopics.js.

Note:

If this is not unique or the file does not exist, then a warning dialog is displayed and the parameter default value is not set. It has the same effect as not specifying the default value.

Drop-down lists require a separate @comboValues line that specifies possible choices, separated by commas.

Note:

For custom scripts, parameter values are only validated when the script is executed, not at submission time. For example, if an unacceptable value is specified for a script, the user is not informed at the time of task submission. If a script cannot recover from invalid data, it logs a message and throws an exception, causing the status to display as Fail (red) in Show Task Status, alerting the user to the problem.