User Tools

Site Tools


Plugin installed incorrectly. Rename plugin directory 'swiftmail.backup' to 'swiftmail'.
This translation is older than the original page and might be outdated. See what has changed.
en:software:tim:rules_matrix

Rules Matrix

The Rules Matrix is used to evaluate Business Rules. Different matrices with custom columns can be produced. Then, the matrix rows are populated. These rows can be evaluated using the MatrixHandler. The row with the highest hit rate is used as the result row (it doesn't have to be a complete match).


Creating a Matrix

A matrix can be created in the administrationsclient . In order to see the relevant tab, the current user must have the role as rulesadministrator.

en_matrix_reiter.jpg

With “Add matrix” a custom number of matrices can be created. When selected, 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.

en_new_matrix.jpg


Define Columns

For the next step, a user-defined 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 TypeDescription
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.

en_columns_new.jpgClicking on “save” creates the matrix, which can now be populated.


Populating the Matrix

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.

en_matrix_overview.jpg

ElementDescription
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.

If an asterisk “*”is selected, this is treated as a wildcard and any value will be used for matching.

Using the Matrix per Actionhandler

How to use the matrix per Actionhandler is described here: MatrixHandler

Evaluation Algorithm

In principle, all of the cells within the matrix will be evaluated individually.

If a perfect match is found within a column, three points are given. For a partial match in the character chain (i.e. is AR is written in the rule, but AR-01 is found in the formula/variable) 2 points are given and for the Wildcard *, one point is given.

The cells with the highest point values deliver the results. If multiple cells with the same point value exist, then the result is delivered by the uppermost cell.

Evaluation Examples

For the basics of this evaluation, we will set up the filled example table from above with three search values and one results column. The following table shows the results of some fictitious evaluations resulting from the previously-described rules:

  • The line with the best match is presented as the result.
  • If more than one line matches, the first match from the top is presented as the result.
Search Value 1Search Value2Search Value3Result
Freisingtrue20Group_1
Freisingtrue89wiki
Freisingtrue*wiki, Group_1
Freisingfalse20Group_1
Freisingfalse8267Group_1
Freisingfalse8wiki
Münchentrue213Prozess Manager
Timbuktufalse89Prozess Manager
Münchentrue8wiki
Münchentrue *Prozess Manager, wiki
**89wiki, Prozess Manager


en/software/tim/rules_matrix.txt · Last modified: 2021/07/01 09:52 (external edit)