Syntax
executeGroovyScript(<groovy>)
Description
Excerpt |
---|
This routine will execute groovy scripts from within the SIL language. |
Parameters
Parameter name | Type | Required | Description |
---|---|---|---|
groovy | string | Yes | The code to be executed |
Return type
string
Examples
Code Block |
---|
return executeGroovyScript("return 'Hello World!'"); |
The issue variable is available within groovy scripts. The issue variable contains the reference to the issue, under which the script is being executed.
Code Block |
---|
return executeGroovyScript("return issue.getKey()"); |
You can also exectute code from a file stored in the SIL Manager.
Code Block |
---|
return executeGroovyScript(readFromTextFile("GroovyFiles/myGroovyFile.txt")); |