Groovy Job

This job executes a script in the Groovy programming language. Groovy is a scripting language that is closely based on the Java syntax but also allows a simplified syntax. It is characterized by its dynamic typing, high execution speed, and good integration into the Java Virtual Machine.

More information about the Groovy programming language is available at http://groovy-lang.org.

Besides the various kinds of functionality, Groovy (and Java) offers specific Jedox Integrator functionality via the Jedox Integrator Scripting API. Cube cell changes made in Groovy jobs can also be audited with the API ICube.loadCell.

All standard Groovy functions are supported. Note that Groovy does not support any UI interactions, such as pop-ups.

Notes

Script

This area provides a scripting window with syntax highlighting. Once you've entered your script, click Save on the toolbar. To check whether the script is valid, click Test. If your test results are good, then click Run to execute the script. The Integrator Monitor will show the results of the job.

Save dialog

Results dialog

Fail on status

If the job executes several loads or sub-jobs, the selected option defines the behavior in case of a warning or an error message in one of the loads or sub-jobs. The options are described below.

none All subsequent loads or sub-jobs are executed even if errors or warnings occur. The job terminates with "Completed with warnings" or "Completed with errors" or "Completed successfully".
error In case of an error message, the job terminates without executing subsequent loads or sub-jobs and the job terminates with status "Failed". In case of warnings subsequent loads or sub-jobs are executed and the job terminates with "Completed with warnings".
warning In case of a warning or an error message, the job terminates without executing subsequent loads or sub-jobs and the job terminates with status "Failed".
inherit If the job is executed directly (without parent job) it uses failOnStatus "error". Otherwise if the job is used as a sub-job it inherits the failOnStatus of its parent job (see corresponding descriptions of these failOnStatus options above).

Groovy scripts can also be used in FieldTransform Functions. For more information, see Groovy Function.

Allowed classes for Groovy Sandbox

In Jedox, Groovy runs in sandbox mode to ensure high security for your environment. Groovy jobs / functions are analyzed at runtime, using only certain classes that are considered safe.

Only the following classes and packages are allowed:

  • com.jedox.palojlib.interfaces.*
  • com.jedox.palojlib.main.*
  • groovy.json.*
  • groovy.sql.*
  • groovy.time.*
  • java.io : StringWriter, BufferedInputStream, BufferedOutputStream, ByteArrayInputStream, BytArrayOutputStream only
  • java.lang : Boolean, Byte, Character, Double, Long, Float, Integer, Long, Math, Object[ ], Short, String, StringBuffer, StringBuilder only
  • java.math.*
  • java.net.URLEncoder
  • java.nio.charset.*
  • java.text.*
  • java.time.*
  • java.util.*
  • org.apache.commons.lang3.*
  • org.apache.groovy.json.internal.*
  • org.apache.poi.ss.usermodel.DateUtil
  • sun.nio.cs.*
  • sun.util.calendar.*
  • All Java primitive types, their corresponding object and array classes

If any other class is used (e.g. java.lang.System or java.lang.ProcessBuilder), you will get an error message.

Updated July 8, 2024