--- title: "Script" slug: "core-scripted-matcher" updated: 2026-04-27T12:20:16Z published: 2026-04-27T12:20:16Z canonical: "docs.lobstersoftware.com/core-scripted-matcher" --- > ## 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. # Script *See also*: [Script actor](/v1/docs/en/core-scripted-actor), [Scripted rule](/v1/docs/en/core-scripted-rule), [Script value](/v1/docs/en/core-scripted-value) ![images/download/attachments/62851653/image-2023-5-22_18-50-3-version-1-modificationdate-1684774203407-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-5-22_18-50-3-version-1-modificationdate-1684774203407-api-v2.png) --- > [!WARNING] > **CAUTION****:** > > The [Script](/v1/docs/en/core-scripted-matcher) compare type is only suitable for highly advanced users with experience of programming. Therefore no detailed application possibilities are described here, since this is part of the developer documentation. The [Script](/v1/docs/en/core-scripted-matcher) compare type should be used exclusively for problems for which **Lobster Data Platform/Orchestration** does not offer generic approaches. **Incorrect use of this compare type can cause significant and irrevocable damage to the system and the dataset.** Please contact our support staff for further information and possible training/workshops in this regard. --- **NOTE:** The [Script](/v1/docs/en/core-scripted-matcher) compare type is only supported on the server side. It is not selectable in the [Client Workflow](/v1/docs/en/frebehav-client-workflow). --- The [Script](/v1/docs/en/core-scripted-matcher) compare type allows the definition of specific compare logic via a [Bean Shell](http://www.beanshell.org/) script. Like all other compare types, the [Script](/v1/docs/en/core-scripted-matcher) compare type is also used within an [Entity property rule](/v1/docs/en/core-entity-property-rule). A `Boolean` value is expected as the return value (`return`) of the script, which defines whether the comparison and therefore the parent [Entity property rule](/v1/docs/en/core-entity-property-rule) is considered "passed" (`true`) or "failed" (`false`). - In fact, any return value other than `true` is considered "failed" at the [Entity property rule](/v1/docs/en/core-entity-property-rule) level. - Errors that occur during execution of the script are intercepted. The [Entity property rule](/v1/docs/en/core-entity-property-rule) is considered as "failed" if necessary. ## Configuration The "script" must be entered as static text in a [Text field](/v1/docs/en/custom-custom-text-field) marked as *syntax highlighter*. The script can also contain comments (see screenshot, below). **NOTE:** The editor is only available in context if the [Role of session](/v1/docs/en/base-session-role-value) has the `Administration/System/BSH Script/Script Bearbeiten` permission. This permission has no influence on the runtime behavior of an already configured comparison. ![images/download/attachments/62851653/image-2023-6-2_7-38-59-version-1-modificationdate-1685684339668-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2023-6-2_7-38-59-version-1-modificationdate-1685684339668-api-v2.png) ### Variables Below the script editor, *value configurations* for variables can be added by clicking on the icon. - A unique **Variable name** must be specified for each variable. - For read access to variables defined here in the script, the `get()`function is needed. An existing variable configuration can be removed by clicking on the trashcan icon. **NOTE:** - The *reference object* for the [Entity property rule](/v1/docs/en/core-entity-property-rule) (`entity`) serves as the *reference object* for *value configurations* of variables. The *check value configuration* of the [Entity property rule](/v1/docs/en/core-entity-property-rule) has no influence on this. - Variables that apply in the context of the [Entity property rule](/v1/docs/en/core-entity-property-rule) can be read in the script via the `action` parameter (see below) even without explicit *value configuration* via `get()` function. ### Parameters At runtime, selected data from the [Entity property rule](/v1/docs/en/core-entity-property-rule) context is provided via parameters for access in the script: | Parameter | Description | | --- | --- | | `environment` | **Lobster Data Platform/Orchestration** *environment* instance | | `si` | *Session information* object (see [Session information](/v1/docs/en/core-session-information-resolver)) | | `logger` | *Logger* instance | | `action` | The current action being handled with all variables (e.g. `action.get("VARNAME")` ) | | `entity` | *Reference object* given by the context of the [Entity property rule](/v1/docs/en/core-entity-property-rule) | | `em` | Current *database session* |