Writing external scripts

Flex has the ability to execute compiled scripts in any JVM language, assembled into a standard JAR file.

NOTE

External scripts require /flex/shared/featureToggles/groovyScriptJarImportsEnabled to be set to true in order to work (otherwise script class, and the JAR URL fields in the action configuration page will not be displayed). This is because they are less secure, so must be opted-in.

Please see the Flex External Scripting Example project in GitHub for an example on how to do this in Groovy.

Once a JAR file has been generated, it can be referenced in Flex via the “JAR URL Field” field in the “External Script” action section of a scripting action. For example: