This is an old revision of the document!
The Rules Matrix is used to evaluate Business Rules. Different matrices with custom columns can be produced. Afterwards the matrix is populated with rows. These rows can be evaluated with the help of an actionhandler. The row with the highest hit rate is used as the result row. If the columns all match exactly, the row with the next best result is used.
A matrix can be created in the administrationsclient . In order to see the relevant tab, the current user must have the role as rulesadministrator.
With “Add matrix” it is possible to create a custom number of matrices. When clicking, a new pop-up window is opened, in which the matrix structure can be defined. First, the matrix needs a name (in this example “decision”). Also, the owner group of the matrix must be defined. All users in this group are able to see and change the matrix. Only groups to which the current user belongs are shown.
For the next step, a discretionary number of columns is created. Every column needs a name and a column type. A column type defines the type of content. Normal column types are used for evaluation, and “result” column types are used only for results and are not considered in the evaluation. There are several different column types:
Column Type | Description |
---|---|
STRING | A normal character string where text can be defined. |
RESULT_STRING | Result column / A normal character string where text can be defined. |
LONG | This column is for integers. |
RESULT_LONG | Result column / This column is for integers. |
FLOAT | This row is for floating decimals. |
RESULT_FLOAT | Result column / This row is for floating decimals. |
BOOLEAN | This column is for true/false values. |
RESULT_BOOLEAN | Result column / This column is for true/false values. |
IDENTITY | In this column, users that are created in the system can be chosen. |
RESULT_IDENTITY | Result column / In this column, users that are created in the system can be chosen. |
The following example shows a matrix with three columns to be searched through. Each column has a different column type. There is also a result column, in which a user will be presented as the result.
Clicking on “save” creates the matrix, which can now be populated.
The following image shows an already-populated matrix. In this view it is possible to delete the entire matrix, to edit the matrix, to add new lines and to delete lines.
Element | Description |
---|---|
1 | This button is used to delete the entire matrix. |
2 | This view shows all filled cells of the matrix. |
3 | This button is used for editing the matrix. It is not possible to change the column type of existing columns; however,they can be deleted an added anew. |
4 | This button is used to delete rows. |
5 | Here, new lines can be added. |
If one wants to add a new row, a pop-up appears. Various fields may be shown depending on the column type. For example, For string, a simple box appears. In identity, a list of all users is displayed. A list populated with either true or false is displayed when using Boolean.
Using the matrix per Actionhandler is described here: MatrixHandler
The filled example matrix presented above used as the basis for the following example evaluations. There are three search values and one result column. The following table shows the results of some fictitious evaluations. The following rules are applied:
Search Value 1 | Search Value2 | Search Value3 | Result |
---|---|---|---|
Freising | true | 20 | Group_1 |
Freising | true | 89 | wiki |
Freising | false | 20 | Group_1 |
Freising | false | 8267 | Group_1 |
München | true | 213 | Prozess Manager |
Timbuktu | false | 89 | wiki |