Entity filter rule
Entity Filter Rules filter records while they are being processed. They can be defined on a Domain Entity, an Entity Copy Task Template or an Entity Copy Task to filter out records.
Every Entity Filter Rule contains a filter script that defines the condition a record must meet to be included in the processing.
If the script returns true, the record will be processed further.
If false is returned, the record will be filtered out and not being copied when executing the corresponding Entity Copy Task.
Properties
The table below documents the available properties for entity filter rules. The 'name' column displays the property name as it can be used in Groovy and Java Scripts.
Name |
Type |
Default |
Description |
|---|---|---|---|
|
active |
Boolean |
true |
Specifies whether the rule is active and therefore used, or inactive and therefore ignored, when a task is executed. |
|
description |
String |
n/a |
An optional description for this object. The description can contain multiple lines to give more context on the configured object. The description is not used in a technical context. |
|
domainEntity |
DomainEntity |
n/a |
Specifies the domain entity to be used by this rule. The domain entity is selected from a list of available domain entities. |
|
domainModel |
DomainModel |
n/a |
Specifies the domain model to be used by this rule. The domain model is selected from a list of available domain models. |
|
filterScript |
String |
boolean filter(Map<String, Object> data) { // Return true if the record should be included, or false if it should be excluded. return true } |
The Groovy code is evaluated when the entity filter rule is used in a task execution or saved. The detailed documentation of the Entity Filter Rule script can be found in the Script Reference. |
|
libraries |
File |
n/a |
A list of files that can be accessed in the script code. When editing the entity filter rule, all XDM files of the specified script language are made available for selection. The content of the selected XDM files is automatically added to the script context. All methods, variables, and classes in the selected files can be accessed in the script of this entity filter rule. |
|
tags |
Tag |
n/a |
Contains the tags that apply to this object. These tags can be used in the search to find objects quickly and effortlessly. |
Actions
The available actions are described below. Some actions apply to the list, while others are specific to selected entity filter rules.
List Actions
The following actions are available on the entity filter rules list. If the action is disabled a tooltip will provide the exact reason for the deactivation. The required permissions are described in detail for each action.
-
Bulk Delete
-
Create
-
Export
-
List History
-
Ordering
Delete the selected objects.
The following options are available:
- Cascade
-
Recursively delete depending objects.
|
When using cascade, dependent objects are deleted first also with cascade enabled. Thus, a cascade deletion is a recursive function that deeply searches for dependent objects and deletes them first. There is only a confirmation for the first object. The dependent objects are deleted without confirmation but only when the user has the DELETE permission. This feature is only available in development mode. More information about development mode can be found in the chapter User Settings. It should be used with caution. |
An object in the result list can have two different states, these are:
- DELETED
-
The object could be deleted.
- NOT_DELETED
-
The object could be not deleted. This may be because the executing person does not have a delete permission on the object or the object is still referenced by others. A detailed reason can be determined with the help of the error message. If the object is still in use, these objects are also displayed.
The following permissions are required on the list:
-
READ
-
WRITE
Creates a new object in the current list. Depending on the object type either a popup dialog is shown for the most important settings, or the complete object is shown in edit mode. The dialog provides the option to create the object and remain in the current list or to switch to the newly created object in edit mode to perform further changes.
The following permissions are required on the list:
-
CREATE
This action allows to export XDM objects in different formats in order to import them via export or CasC in another environment.
Refer to configuration of export for more information.
Related and dependent objects can optionally be included in the export. The export dialog has the following options:
- Include dependent objects
-
Dependent objects only belong to the exported object like rules and tasks.
- Include permissions
-
Permissions of each exported object, only when the object supports permissions. Some objects like rules don’t have permissions.
- Include referenced objects
-
Referenced objects exist by their own and are used in the exported object like connections and environments.
- Include objects that depend on referenced objects
-
Also include the dependent objects of the referenced objects. E.g. the rules of a modification set or the rules in an application model version.
- Include implicit created objects
-
Implicit created objects are tasks or workflows which were automatically created for execution. These objects won’t be exported by default, but can be included by setting this flag. When exporting implicit objects, make sure that the
Include dependent objectsflag is also enabled.
|
Objects on which the user does not have For example a connection object would refer to the credential, even if the user does not have |
The following permissions are required on the list:
-
READ
The history list tracks all modifications made to objects within it. A new record is added each time an object is created, edited, or deleted. A record indicates who made the change, which object was affected, and when the change was made.
For more information about the concept of the history refer to the history concepts.
The following permissions are required on the list:
-
READ
Opens a new view on the list that allows the user to specify the ordering of the elements using drag and drop. Confirm the new ordering with Save Changes.
The following permissions are required on the list:
-
READ
-
WRITE
Object Actions
The following actions are available on specific entity filter rules. In order to execute the action, the user must possess the necessary permissions for the object. The permissions required for each action are described individually. If the user does not have these permissions, the action will be disabled and the tooltip will provide the exact reason for the deactivation.
-
Check
-
Copy
-
Delete
-
Edit
-
Object History
This action validates the object and its dependencies, reporting configuration errors that could cause issues during task or workflow execution. The validation will cascade through the child objects of the checked objects and objects referenced by them.
For instance, if an installed application of an environment is checked, the check will process the application model, the specified version, the connection, modification sets, and involved modification methods. If an object has rules, all active rules will be checked. The modeling connection and version, including their modification sets and methods, will also be checked. Deactivated objects will not be included in recursive checks, but can be checked individually if the check is executed on the object itself.
Checks often require additional information from the context of the objects being checked, such as necessary connections or custom parameter values. The check will gather information from the objects being checked and use it to perform checks on child objects. Any required additional information must be provided before the check begins. The check queries the user to provide these missing information.
- Database object checks
-
For all rules which reference database objects such as tables, columns, etc, the check verifies that the those objects exist in the database system. If a connection can be inferred from the context, then this connection is used. If no connection is available in the context, it must be specified before the check is executed.
- Connection checks
-
For objects which configure access to external systems, such as connections or storage locations, the configuration check verifies that access can be established using the given credentials. Furthermore, additional operations on database connections are performed to check whether the credential user has the necessary authorization to access relevant database objects. In particular, the credential user’s permission to read source tables and write to target tables is verified. Similarly, for storage locations the check verifies that the credential user has permission to write to the working directory.
- Code checks
-
For all entities containing code segments, such as modification methods or condition scripts, the syntax for the code is checked. This does not check, however, whether at run time all necessary variables are likely to be available.
The following permissions are required:
-
READ
The copy action creates an identical copy of the object. A new entry is created in the object list and all properties in the new object are set identical to the copied object.
The following permissions are required:
-
READ
-
WRITE
Delete the object. If the object is still used by another entity, an error message is displayed, and the object is not deleted. The delete operation must be confirmed in a separate popup.
The following options are available:
- Cascade
-
Recursively delete depending objects.
|
When using cascade, dependent objects are deleted first also with cascade enabled. Thus, a cascade deletion is a recursive function that deeply searches for dependent objects and deletes them first. There is only a confirmation for the first object. The dependent objects are deleted without confirmation but only when the user has the DELETE permission. This feature is only available in development mode. More information about development mode can be found in the chapter User Settings. It should be used with caution. |
The following permissions are required:
-
READ
-
WRITE
Opens the current entity in edit mode.
The following permissions are required:
-
READ
-
WRITE
The history displays all changes made to the respective XDM object, including any changes made to its rules.
Each change record includes information about the operation performed (e.g. CREATE, UPDATE, DELETE), the timestamp, and the user responsible for the change.
For more information about the concept of the history refer to the history concepts.
The following permissions are required:
-
READ
Usage Details
Multiple Entity Filter Rules can be defined in a Domain Entity, an Entity Copy Task Template or an Entity Copy Task. If there are multiple entity filter rules defined in the same domain entity or task template, they will be applied in ascending order.
Furthermore, if there are entity filter rules defined in both the domain entity and the task template (or the task itself), the entity filter rules will be applied in the following order:
-
Domain Entity
-
Entity Copy Task Template
-
Entity Copy Task
Filter script examples can be found in the script reference.