> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported scripts

> Scripts are used to define and run actions but also properties inside nodes. For now, the following script languages are supported.

## Business rules scripting

<CardGroup>
  <Card title="Python" icon="python" href="#python" />

  <Card title="DMN" icon="code" href="#dmn" />

  <Card title="MVEL" icon="code" href="#mvel" />

  <Card title="Groovy" icon="code" href="#groovy" />

  <Card title="JavaScript (Nashorn)" icon="code" href="#nashorn-engine-javascript" />
</CardGroup>

| Scripting Language | Language Version | Scripting Engine                    | Scripting Engine Version |
| ------------------ | ---------------- | ----------------------------------- | ------------------------ |
| Python             | 2.7.0            | Jython                              | 2.7.3                    |
| DMN                | 1.3              | camunda.engine.dmn                  | 7.20.0                   |
| MVEL               | 2                | org.mvel.mvel2                      | 2.5.2.Final              |
| Groovy             | 3.0.21           | org.codehaus.groovy » groovy-jsr223 | 3.0.21                   |
| JavaScript         | ECMAScript 5.1   | Nashorn                             | 15.4                     |

## Integration designer scripting

| Scripting Language | Language Version | Scripting Engine | Scripting Engine Version |
| ------------------ | ---------------- | ---------------- | ------------------------ |
| Python             | 3.10             | GraalPy          | 3.10.8                   |
| JavaScript         | ES 2019+         | GraalJS          | GraalVM 23.0.1+          |

***

## GraalVM CE Native 23.0.1

**GraalVM CE Native 23.0.1** is the community edition of GraalVM with support for multiple languages and AOT (ahead-of-time) compilation to native images. This allows Java and polyglot applications to start quickly and use fewer resources, making it ideal for serverless, CLI, and microservice applications.

### Supported Languages and Versions

* **Java**: JDK 17 base, providing the complete Java language specification and libraries.
* **JavaScript**: GraalJS runtime, with a minimum supported version of **ECMAScript 5** and full compatibility up to **ECMAScript 2022**.
* **Python**: GraalPy, compatible with **Python 3.10** syntax and libraries, enabling seamless integration with Java.

### Properties

* Offers fast startup and low memory usage through Native Image compilation.
* Provides polyglot capabilities, enabling interoperability between languages.
* Available on Linux, macOS, and Windows for a range of deployment environments.

### Useful Links

<Card title="GraalVM Documentation" href="https://www.graalvm.org/docs/" icon="link" />

<Card title="GraalVM 23.0.1 Release Notes" href="https://www.graalvm.org/release-notes/" icon="link" />

***

## GraalPy

GraalPy is a Python 3.10-compatible runtime built on **GraalVM**. It allows developers to embed Python into Java applications, providing high-performance execution and interoperability with Java. **GraalPy** supports Python’s standard library and is optimized for environments where Java and Python integration is essential, such as in data processing and AI applications.

### Properties

* Supports **Python 3.10** with most core libraries.
* Enables seamless interoperability with Java classes and functions.
* Offers performance benefits via GraalVM's Just-In-Time (JIT) compiler for optimized execution.

### Useful links:

<Card title="GraalPy Documentation" href="https://docs.oracle.com/en/graalvm/graalpy" icon="link" />

## GraalJS

GraalJS is the JavaScript runtime within GraalVM that supports **ECMAScript 2022**, bringing modern JavaScript features to the JVM. GraalJS offers full Java interoperability, enabling JavaScript code to interact with Java classes directly. It is compatible with **GraalVM 23.0.1** and later, and it supports both JavaScript and Node.js applications, making it ideal for polyglot projects.

### Properties

* Implements **ECMAScript 2022** for modern JavaScript syntax and features.
* Provides full interoperability with Java, allowing seamless integration of JavaScript and Java code.
* Runs Node.js applications with support for the npm ecosystem.

### Useful links:

<Card title="GraalJS Documentation" href="https://www.graalvm.org/reference-manual/graaljs/" icon="link" />

***

This documentation provides an overview of GraalVM CE Native 23.0.1’s language support and specific runtime details for each supported language.

## Jython

**Jython** is an implementation of the high-level, dynamic, object-oriented language [Python](http://www.python.org/) seamlessly integrated with the [Java](http://www.javasoft.com/) platform. Jython is an open-source solution.

<Card title="Jython Book" href="https://jython.readthedocs.io/en/latest/" icon="link" />

### Properties

* Supports **Python 2.7** most common python libs can be imported, ex: math, time, etc.
* Java libs can also be imported: [details here ](https://www.tutorialspoint.com/jython/jython_importing_java_libraries.htm)

### Useful links:

<Card title="Python 2.7 documentation" href="https://docs.python.org/2.7/" icon="link" />

<Card title="Jython" href="https://www.jython.org/" icon="link" />

<Card title="Jython FAQs" href="https://wiki.python.org/jython/JythonFaq" icon="link" />

## DMN

Decision Model and Notation (DMN) is a standard for Business Decision Management.

FLOWX uses [BPMN.io](https://bpmn.io/) (based on **camunda-engine-dmn** version **7.20.0**) which is built on [DMN 1.3](https://www.omg.org/spec/DMN/1.3/PDF) standards.

### Properties

**camunda-engine-dmn** supports [DMN 1.3](https://www.omg.org/spec/DMN/1.3/PDF), including Decision Tables, Decision Literal Expressions, Decision Requirements Graphs, and the Friendly Enough Expression Language (FEEL)

### Useful links:

<Card title="Decision Model and Notation (DMN)" href="https://www.omg.org/dmn/" icon="link" />

<Card title="DMN 1.3 specs" href="https://www.omg.org/spec/DMN/1.3/PDF" icon="link" />

**More information:**

<Card title="DMN Business rule action" href="/4.0/docs/platform-overview/frameworks-and-standards/business-process-industry-standards/intro-to-dmn" />

## MVEL

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**](https://mvnrepository.com/artifact/org.mvel/mvel2/2.4.10.Final)

### Useful links

<Card title="Mvel documentation" href="http://mvel.documentnode.com/" icon="link" />

<Card title="Maven repository: Mvel 2.4.0 final" href="https://github.com/mvel/mvel/tags" icon="link" />

### More information

<Card title="Intro to MVEL" href="/4.0/docs/platform-overview/frameworks-and-standards/business-process-industry-standards/intro-to-mvel" />

## Groovy

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.21** version, using **groovy-jsr223** engine.

<Info>
  **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**.
</Info>

<Info>
  **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.
</Info>

### Useful links

<Card title="Groovy Language Documentation" href="https://docs.groovy-lang.org/docs/groovy-3.0.21/html/documentation/" icon="link" />

<Card title="[Java] Class GroovyScriptEngineImpl" href="https://docs.groovy-lang.org/latest/html/gapi/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.html" icon="link" />

<Card title="groovy-jsr223" href="https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-jsr223" icon="link" />

## Nashorn Engine (JavaScript)

Nashorn engine is an open source implementation of the [ECMAScript Edition 5.1 Language Specification](https://es5.github.io/). 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](https://search.maven.org/artifact/org.openjdk.nashorn/nashorn-core/15.4/jar). You can check the [changelog](https://github.com/openjdk/nashorn/blob/main/CHANGELOG.md) to see what's new.

### Useful links

<Card title="Nashorn - Changelog" href="https://github.com/openjdk/nashorn" icon="link" />

<Card title="OpenJDK - Nashorn" href="https://github.com/openjdk/nashorn/blob/main/CHANGELOG.md" icon="link" />

<Card title="nashorn-core - Maven Central" href="https://central.sonatype.com/artifact/org.openjdk.nashorn/nashorn-core/15.4?smo=true" icon="link" />
