Script Whitelist
Every script that executes in X1 is subject to a whitelist. The script whitelist includes allowed packages and static classes used in the script.
It includes "standard" classes and packages, as well as any custom ones that you add.
All static classes defined in the script whitelist are imported by default, so you don't need to import them in your script. Likewise, all classes from any packages defined in the script whitelist are imported by default.
Note
If a script contains a class or package not included on the whitelist, an error displays when you attempt to save the script.
On the Static Classes tab, select Add Class.
Enter a class name. For example, com.example.MyClass
In the top right corner of the page, select Save.
On the Packages tab, select Add Package.
Enter a package name.
In the top right corner of the page, select Save.
Any whitelisted class can be used in a script without needing to import it.
For example, if you have a class java .time.Instant in the whitelist, you can use it in a script like this:
```groovy return Instant.now() ```