A script file can be defined in EKM using one of the two supported scripting languages: BeanShell or Python.
BeanShell can execute code that is written in standard Java syntax while providing scripting conveniences such as loose types and dynamic execution. For more information on BeanShell and to see its detailed documentation, refer to http://www.BeanShell.org. With BeanShell you have full access to all classes provided by Java’s JDK. EKM uses JDK 1.8, so you can use any of its classes in scripts defined using BeanShell. BeanShell script files are saved with the .bsh file extension.
Python is a powerful and easy-to-use scripting language that is very popular. EKM uses Jython 2.7 to handle Python syntax. To learn more about Jython, refer to http://www.jython.org/index.html. To learn more about Python, refer to http://www.python.org. Jython 2.7 allows the use of Python 2.7 language features. In addition, you can use any Java classes offered by JDK 1.8. Python script files are saved with the .py file extension.
In addition to the language features and libraries provided by the scripting languages, scripts can also use a scripting interface provided by EKM. This interface exposes predefined methods that can be used to access or modify data in EKM and execute common operations. See Using EKM's Scripting Interface for information about the classes and methods that are available through the scripting interface.
Note: A limitation of Python is that the output from a script is displayed only in the console of your application server (for example, JBoss 7) and does not appear in the Output log in the Open Command Window dialog box.