EXPRESSION

Expression node allows you to add application processing elements in the form of a script (Groovy/R/Python ). Node consists of an area 2 buttons: Edit and Remove. The Edit button opens a window to edit the code, the Remove button deletes the code. You can also just click on the code area to open code editor.

The code editor window have two drop down menus to select programming language and font size. The editor highlights syntax, verifies bracket pairing, allows search and replace operations.

Groovy
If you want to return a variable's value from a Groovy script, you need to use an undeclared variable. Using 'def' or an explicit type, as in the example below, would fail because you would then create a local variable
Only r_1 and r_2 variables will be returned from the example on the right.
You can use any primitive types, collections and classes available in Java and Groovy (as long as they have a logical representation in JSON)

Python
To return a value from a python script, you need to use the return statement.
The return value can be any of: Python 2 Str, Python 3 Str, Python 3 Unicode, True, False, Python 2 Int, Python 2 Long, Python 3 Int, Float, List, Dictionary
It is possible to import all standard Python libraries (e.g. time
, sys
, math
, ...) and any other, which were installed on the platform.

R
To return a value from an R script, you need to assign it to a variable named 'rResult'. This can be any of the following data types:
Logical
Numeric
Integer
Character
as well as R-objects that are at most 2-dimensional:
Vector
List
Matrix
Array
Data Frame


Last updated