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 https://tim-doc.atlassian.net/wiki/spaces/eng/pages/228561240. 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 Rules matrix panel under administration. The role of rules administrator is required in order to set up a matrix. A rules matrix can be created by clicking on the 'Create Rules Matrix'.

Reference

Attribute

Description

Reference

Attribute

Description

1

Create Rules Matrix

The button 'Create Rules Matrix' will open up a detailed view for a 'New rules matrix' in order to be enabled to save a new matrix. 

A detailed view opens on the right side of the screen in order to set the attributes for the new rules matrix. The mandatory fields need to be filled and saved.

Reference

Attribute

Description

Reference

Attribute

Description

2

Name

 Mandatory Field for describing the rules matrix.

3

Owner

Mandatory drop-down for setting the owner of the rules matrix.

4

Add Columns

The button 'Add Columns' will configure the new rules matrix. Additional information will be given under the following section 'Define Columns'. 

5

Save

The button 'Save' will save the changes to the rules matrix and make it available for usage.

 

Define Columns

Once a matrix is created columns need to be added. 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. The different column are:

Column type

Description

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

A column for integer values.

Result Long

Result column for integer values.

Float

A column for floating decimal values.

Result Float

Result column for floating decimal values.

Boolean

A column for boolean (true/false) values.

Result Boolean

Result column for boolean (true/false) values.

Identity

A column for users present in the system that can be chosen.

Result Identity

Result column for users present in the system that can be chosen.

Group

A column for groups present in the system that can be chosen.

Result Group

Result column for groups present in the system that can be chosen.

 

The set columns are displayed in the matrix table of the selected rules matrix.

Reference

Attribute

Description

Reference

Attribute

Description

6

Archive selected matrices

Single or multiple matrices can be archived by clicking the 'Archive selected matrices' button. A pop-up will ask for confirmation.

Archived matrices can not be reactivated via front end. Use this feature with caution.

7

Download Matrix

A selected matrix can be exported with the 'Download Matrix' button. A pup-up will appear and the user can choose between three encoding types. The file will be saved in the csv format.

8

Matrix table

The matrix table displays all added columns of a matrix including the column name, the column type, allowed wildcards and the option to delete a specific column. Existing columns can be altered by clicking onto the name of a column.

9

Delete

The 'Delete' button will remove a matrix from the rules matrix view. A pup-up will ask for confirmation. Once deleted a matrix can not be restored. 

10

Save

All changes to a matrix need to be saved to take effect. This is true for newly create and existing matrices.

 

In order to add columns to the matrix click on the 'Add Columns' button and a pup-up will appear.

Reference

Attribute

Description

Reference

Attribute

Description

11

New column

After clicking the 'Add Columns' button a pop-up will appear and enable the user to define a new column.

12

Column name

Mandatory field for naming a column.

13

Column type

Mandatory field to set the type of the column via a drop-down selection. The different types are explained in the table below.

14

Allow wildcards

Select box when set allows the use of wildcards.

 

Populating the Matrix

The following image shows an already-populated matrix. In this view, it is possible to edit the matrix, to add new lines, and to delete lines.

Reference

Attribute

Description

Reference

Attribute

Description

15

Simulation of matrix

The button 'Simulation of matrix' offers the option to test the set rules immediately. 

16

Quick filter of matrix column(s)

The filter enables the user to display specific results for a set rule.

17

Archive record

The button 'Archive record' will remove the selected rule from the front-end. A pop-up will require confirmation as once removed entries can not be recovered.

18

Add Rule

The 'Add Rule' button will enable the user to add additional lines to the matrix.

 

If one wants to add a new line, 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.

 

Use the Matrix per ActionHandler

The use of the matrix with the MatrixHandler is described here: https://tim-doc.atlassian.net/wiki/spaces/eng/pages/228561240

 

 

Example Rules Matrix

  1. Open the Rules Matrix under the Administration tab and click the plus icon.

     

  2. Enter the name and owner information and you can start entering columns

     

  3. For this example, columns are entered as follows:

    Remember that you have to specify your result columns with the column types starting with 'Result'.

  4. Click save:

     

  5. You can now add your rules to your matrix as follows:




    You can use this rules matrix to specify results based on department information.

 

Evaluation Algorithm

In principle, all 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), then two points are given. For the Wildcard *, one-point is allocated. 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

Search Value 1

Search Value 2

Search Value 3

Search Value 4

Search Value 1

Search Value 2

Search Value 3

Search Value 4

Munich

true

1000

HR, Backoffice, IT, Supervisor

Munich

false

700

HR, IT

Munich

true

93000

HR, IT

San Francisco

true

100000

IT

San Francisco

true

52

Backoffice, IT

San Francisco

false

80040

IT

Luzern

false

*

HR

Luzern

*

7

Backoffice, IT

Bern

true

2000

HR, Supervisor

Wien

true

*

Supervisor

Wien

false

5631

Supervisor

Wien

true

*

Backoffice

Berlin

*

89

Supervisor