Supported scripts
Supported scripts
Scripts are used to define and run actions but also properties inside nodes. For now, the following script languages are supported:
- Python (Jython)
- DMN
- MVEL
- Groovy
- JavaScript (Nashorn Engine)
Scripting Language | Version |
---|---|
Python (Jython) | 2.7.0 |
DMN | 1.3 |
MVEL | 2.4.10 |
Groovy | 3.0.8 |
Nashorn engine (JavaScript) | 15.4 |
Python
We use Jython.
Jython is an implementation of the high-level, dynamic, object-oriented language Python seamlessly integrated with the Java platform. Jython is an open-source solution.
Properties:
- Supports Python 2.7 most common python libs can be imported, ex: math, time, etc.
- Java libs can also be imported: details here
Useful links:
»Python 2.7.18 documentation»Jython»Jython FAQsDMN
Decision Model and Notation (DMN) is a standard for Business Decision Management.
FLOWX uses BPMN.io (based on camunda-engine-dmn version 7.14.0) which is built on DMN 1.3 standards.
Properties:
camunda-engine-dmn supports DMN 1.3, including Decision Tables, Decision Literal Expressions, Decision Requirements Graphs, and the Friendly Enough Expression Language (FEEL)
Useful links:
»Decision Model and Notation (DMN)»DMN 1.3 specsMore information:
»Intro to DMN»DMN Business Rule ActionMVEL
MVEL is a powerful expression language for Java-based applications. It provides a plethora of features and is suited for everything from the smallest property binding and extraction, to full-blown scripts.
- FLOWX uses mvel2 - 2.4.10 version
Useful links:
»Mvel documentation»Maven repository: Mvel 2.4.0 finalMore information:
»Intro to MVELGroovy
Groovy is a multi-faceted language for the Java platform. The language can be used to combine Java modules, extend existing Java applications and write new applications
We use and recommend Groovy 3.0.8 version, using groovy-jsr223 engine.
Groovy has multiple ways of integrating with Java, some of which provide richer options than available with JSR-223 (e.g. greater configurability and more security control). JSR-223 is recommended when you need to keep the choice of language used flexible and you don't require integration mechanisms not supported by JSR-223.
JSR-223 (spec) is a standard scripting API for Java Virtual Machine (JVM) languages . The JVM languages provide varying levels of support for the JSR-223 API and interoperability with the Java runtime.
Useful links:
»Groovy Language Documentation»[Java] Class GroovyScriptEngineImplNashorn Engine (JavaScript)
Nashorn engine is an open source implementation of the ECMAScript Edition 5.1 Language Specification. It also implements many new features introduced in ECMAScript 6 including template strings; let
, const
, and block scope; iterators and for..of
loops; Map
, Set
, WeakMap
, and WeakSet
data types; symbols; and binary and octal literals. It is written in Java and runs on the Java Virtual Machine.
Latest version of Nashorn is 15.4, available from Maven Central. You can check the changelog to see what's new.