Job Custom Java Script
Purpose
The job executes freely definable JavaScript code on the server side. It is inactive by default in the job catalog and should only be used for reviewed maintenance or automation tasks.
Configuration
- Javascript Code: The multi-line JavaScript code to be executed.
-
Script Engine: The engine used for the code. The current code supports
NASHORNandGRAAL. Without a valid value,NASHORNis used; an unknown value also falls back toNASHORN. - Use Transaction: If activated, the job run is executed as a transaction. Whether a rollback takes place depends on the normal transaction handling of the job framework.
Execution context
-
loggerandlogare available as loggers. - The scripting service additionally provides
appCtxas access to registered Webdesk Spring beans. - The script is passed in full to the scripting service. The return value is not processed further by the job; changes, external calls and log output are what matters.
Notes
- Run scripts in a test environment first and back up the source code outside the job configuration.
- Check permissions, side effects and repeatability. An activated transaction mode does not protect external calls.
- Errors during script execution are not handled by the job in terms of content and can abort the job run.
Keine Kommentare vorhanden.