Script Task
Introduction
In Flowable, Script Tasks are used to execute scripts in a JSR-223 compatible scripting language, for instance JavaScript or Groovy.
Scripts Tasks are mainly used to perform simple calculations or operations. It is always recommended to rather use a Service Registry Task to make scripts less dependent on the process model. For more complex use cases, you should consider writing a Java Service and calling it via a Service Task.
To use JavaScript as a scripting language, it is required to have a JavaScript scripting engine on the classpath. For Java 8 and 11 the Nashorn Engine is included by default. In case you are running a new Java version (e.g. 17) and you are using a customization project, you need to add the dependency manually:
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
</dependency>
Properties
:::palette-item com.flowable.design:flowable-core-palette com/flowable/palette/core.case.palette ScriptTask