executeGroovyScript

Syntax

executeGroovyScript(<groovy>)

Description

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

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.

return executeGroovyScript("return issue.getKey()");

You can also exectute code from a file stored in the SIL Manager.

return executeGroovyScript(readFromTextFile("GroovyFiles/myGroovyFile.txt"));