Skip to Content

Groovy Runner

Introduction

The Groovy Runner plugin executes a Groovy script on the agent. The script to run is provided either in the variable groovy.script or in a local file with the path given by groovy.file. The return value is stored in the output variable groovy.return.

This plugin can be associated only with Private Agent Groups and is not available on the Jitterbit Cloud Agent Groups.

Important

Plugins provided by Jitterbit are deprecated. See Deprecation and Support in Plugins.

Download and Add the Plugin

The Groovy Runner plugin must be downloaded at the link provided below and added to the organization (see Add New Plugins in Customizations > Plug-ins).

Associate the Plugin with an Agent Group

The Groovy Runner plugin must be associated with a Private Agent Group to make the plugin available on all agents in the group (see Associate Agent Groups in Customizations > Plug-ins).

Set Variables and Use the Plugin in a Project

Refer to these topics for information about using plugins in a project:

The Groovy Runner plugin uses these variables:

Name Type Required Description
groovy.script String Optional The script to run. If not set, groovy.file must be set. If both are set, groovy.script takes precedence.
groovy.file String Optional The path to a file that contains the script to run. The file must be readable by the Jitterbit plugin engine. If not set, groovy.script must be set.
groovy.input.* Optional Provides the input parameters, if any, to the script. For example, if the script refers to an input parameter called user, set the variable groovy.input.user to the value of this parameter.
groovy.output.* Optional Provides access to variables that are set in the script. For example, if the script defines a new variable date, the value of that variable can be retrieved by defining the variable groovy.output.date and giving it any non-null value before the plugin runs. (This initial value is ignored — it is used only to signal the interest in the corresponding variable.) After the plugin has run, this variable will contain the value of the date variable.
groovy.return String Optional The value returned by the script (if any). This variable does not need to be set before calling the script. After the script has run, this variable contains the value returned by the script.