Scripting in Compose
The Compose platform uses Groovy for scripting. Groovy is a dynamic language for the Java Virtual Machine and is a super set of Java. Often there are easier ways to do things in Groovy compared to Java. Groovy scripts are executed in a sandboxed environment. Many of the Groovy language features can be used along most of the core library functionalities (List, Map, and Set etc).
Code windows are scattered across the Compose Builders to enable operational flexibility. Here are just some of the many places you’ll find code windows:
The Script activity in the Workflow Builder - Script (workflow activity)
The Execute script event in the Form Builder - Events
Coding validation rules in the Validation Builder - Validation
Creating text templates in the Text Generator Builder - Text generators - XML/JSON output
Creating request bodies in the Generic Service Builder - Generic service
Transforming data in most builders - Transformation scripts
In this folder you will find the following documentation and user guides on advanced scripting:
Advanced file-based scripting
See user cases of scripting with files.
Advanced form scripting
See user cases and scripts commonly used in forms.
Condition scripting
View the different operators and functions available for condition scripting.
Properties of Objects available in script contexts
See the property overview of the different Objects in Compose.
Text generators – XML/JSON output
Use text generators to customize XML/JSON output files based on workflow information.
Transformation scripts
Use Groovy scripts to transform data.
Investigate some of the features available in Compose scripting from our Scripting API: https://docs.usecompose.com/scripting/ (seen in the Iframe below)