|
|
# Rules and Scripts
|
|
|
|
|
|
## Rules
|
|
|
The purpose of rule packages and rules is to do WAS GENAU?
|
|
|
The main purpose of rule packages and rules is to do access checks for services. Rules can also be used for mangling user data, like scripts, which can be easier to understand.
|
|
|
|
|
|
### Rule packages
|
|
|
|
|
|
To manage rule packages, navigate to `Rules -> List rules`. Add a rule package by selecting `Add rule package`, and then enter the required rule package properties:
|
|
|
|
|
|
* `Package name`: Enter a name for the package. SYNTAX-RESTRIKTIONEN?
|
|
|
* `Package name`: Enter a name for the package.
|
|
|
* `Knowledge base`: Enter the knowledge base.
|
|
|
* `Version`: Enter a version number.
|
|
|
|
|
|
These values are from the framework of the rules engine Drools and are drived from Maven packages. The package name refers to the groupId, knowledge base to the artifactId in Maven syntax. When rule packages are compiled, they are bundled in local class and stored in a local in memory repository. This repository is used by the Drools framework to run the rules.
|
|
|
|
|
|
A rule package can contain one or more rules. They are all compiled in this packages and executed when the package is run. For more details, please refer to the [Drools](https://www.drools.org) documentation.
|
|
|
|
|
|
### Rules
|
|
|
|
|
|
To manage rules, navigate to `Rules -> List rules`. Add a rule by selecting `Add rule`, view details of available rules by selecting one in the table. In the rule editor, edit the following fields.
|
|
|
|
|
|
* `Name`: Set/change the name of the rule. SYNTAX-RESTRIKTIONEN?
|
|
|
* `Name`: Set/change the name of the rule. There are no explicit restricitions, but best to use only alphanumeric and `-_`
|
|
|
* `Rule package`: Assign the rule to one of the available rule packages (see above)
|
|
|
* `Rule type`: For the type, use one of the following values: WELCHE?
|
|
|
* `Rule`: Here you can edit the rule itself. VOREINGESTELLTES BEISPIEL WÄRE NÜTZLICH
|
|
|
* `Rule type`: For the type, use one of the following values: At the moment only tested value is `DRL`
|
|
|
* `Rule`: Here you can edit the rule itself.
|
|
|
|
|
|
### Tools
|
|
|
|
... | ... | |