--- title: "Scripted rule" slug: "core-scripted-rule" updated: 2026-08-14T08:08:37Z published: 2026-08-14T08:08:37Z canonical: "docs.lobstersoftware.com/core-scripted-rule" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Scripted rule > [!NOTE] > **NOTE:** > > The use of [Bean Shell](http://www.beanshell.org/) scripts in **Lobster Data Platform** requires advanced programming skills and profound knowledge of system internals. > > ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/warning(79).svg) **Improper use of script may cause severe and irreversible damage to the system and data contained** ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/warning.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/warning(79).svg) > > [Bean Shell](http://www.beanshell.org/) scripts are used exclusively to meet requirements that are so special they cannot be covered by any of the generic configuration options available. > > Please contact **Lobster Data Platform** support by [support@lobstersoftware.com](mailto:support@lobstersoftware.com) for further information or to learn about options for training or workshops. A [Scripted rule](/v1/docs/en/core-scripted-rule) executes a [Bean Shell](http://www.beanshell.org/) script entered in the editor, which should return a Boolean value (`true` or `false`). Changing an existing script requires the permission `Administration/System/BSH script/Edit script`. ![images/download/attachments/201665491/image-2025-3-27_10-59-8-version-1-modificationdate-1743069548098-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-3-27_10-59-8-version-1-modificationdate-1743069548098-api-v2.png) The following parameters are available within the context of a script: | Parameter | Description | | --- | --- | | `environment` | **Lobster Data Platform** environment instance. | | `si` | Current user session. | | `logger` | Logger instance. | | `action` | The currently handled action including any variables (e. g. `action.get("VARNAME")` ). | | `entity` | Current entity for the action. | | `em` | Current database session. | Additionally, custom variables can be defined for the rule, which can be referred to in the script.