Skip to main content
Version: 10.2.4

Execute Groovy script

The feature allows executing GroovyScript on a Bot machine (Windows RPA Server), not in Control Tower. For more details, see the JavaDoc link.

You can optionally pass a timeout and parameters for your GroovyScript. The possible variants of the executeGroovyScript() method are as follows:

  • executeGroovyScript(script)
  • executeGroovyScript(script, timeout)
  • executeGroovyScript(script, scriptParams)
  • executeGroovyScript(script, timeout, scriptParams)

You can create the scriptParams object using the following syntax:

import com.workfusion.rpa.helpers.ScriptParams

// initializing the object
def scriptParams = new ScriptParams(['fileSuffix':'.txt', 'fileData':fileData])

// adding one property
scriptParams.add('filePrefix','temp-')

// adding multiple properties
scriptParams.addAll(['key1':'val1', 'key2':'val2'])