This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:software:tim:rules_matrix [2015/04/21 11:21] max.neumaier |
en:software:tim:rules_matrix [2021/07/01 09:52] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== 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 [[:en:software:tim:actionhandler:matrixhandler|MatrixHandler]]. The row with the highest hit rate is used as the result row (it doesn't have to be a complete match). |
- | The Rules Matrix is used für evaluation of Business Rules. It is possible to create different matrixes with custom columns. Afterwards the matrix gets filled with rows. These rows can be evaluated with the help of an actionhandler. The row with the best match will be used as the result row. If not all columns match exactly, the row with the next best result is used. | + | ---- |
- | ----------------- | + | === Creating a Matrix === |
- | ===Creating a Matrix=== | + | |
- | A matrix can be created in the [[en:software:tim:administration_client | administrationsclient ]]. In order to see the corresponding tab, the current user must have the [[en:software:tim:rights | role]] **rulesadministrator**. | + | |
- | {{ en_matrix_reiter.jpg?1200 }} | + | A matrix can be created in the [[:en:software:tim:administration_client|administrationsclient ]]. In order to see the relevant tab, the current user must have the [[:en:software:tim:roles| role]] as **rulesadministrator**. |
- | With "Add Matrix" it is possible to create a custom number of matrixes. When clicking, a new popup is opened in which the structure of the matrix can be defined. First the matrix needs a name, in this example "decision". Also the owner group of the matrix has to be defined. All users in this group are able to see the matrix und to change it. Only groups in which the current user is member are shown. | + | {{ :en:software:tim:en_matrix_reiter.jpg?1200 |en_matrix_reiter.jpg}} |
- | {{ en_new_matrix.jpg?400 }} | + | 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. |
- | -------------------------------- | + | |
- | ===Define Columns=== | + | |
- | For the next step number of columns has the created. Every column needs a name and a coumn type. A column type defines the type of the content. Normal column types are used for evaluation and "result" column types are used for results and are not considered for the evaluation. There are different column types: | + | |
- | ^Column Type^ Description^ | + | {{ :en:software:tim:en_new_matrix.jpg?400 |en_new_matrix.jpg}} |
- | | **STRING** | A normal characterband where text can be defined. | | + | |
- | | **RESULT_STRING**| **Result column** / A normal characterband 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 or false values. | | + | |
- | |**RESULT_BOOLEAN**| **Result column** / This column is for true or false values. | | + | |
- | |**IDENTITY**| This column is for users that are created in the system.| | + | |
- | |**RESULT_IDENTITY**| **Result column** / This column is for users that are created in the system.| | + | |
- | The following example shows a matrix with 3 columns, which should be searched. Each column has a different column type. There is also a result column in which a user will the evaluated result. \\ | + | ---- |
+ | |||
+ | === 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 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.\\ | ||
\\ | \\ | ||
- | {{ en_columns_new.jpg }} | + | {{ :en:software:tim:en_columns_new.jpg |en_columns_new.jpg}}Clicking on "save" creates the matrix, which can now be populated. |
- | After click on "save" the matrix is created and can now be filled with values. | + | |
- | ------ | + | ---- |
- | ===Filling the matrix=== | + | === Populating the Matrix === |
- | The following image shows a already filled matrix. In this view it is possible to delete the hole matrix, to edit it, add new lines and to delete lines. \\ | + | |
+ | 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 }} | + | {{ :en:software:tim:en_matrix_overview.jpg |en_matrix_overview.jpg}} |
- | ^Element ^Description^ | + | ^Element^Description| |
- | |**1**| With this button the hole matrix can be deleted.| | + | |**1** |This button is used to delete the entire matrix.| |
- | | **2** | This view shows the matrix with all the filled values. | | + | |**2** |This view shows all filled cells of the matrix.| |
- | | **3** | Wit this button the matrix can be edit. It is not possible to change the column type of exisiting columns. But they can be deleted an newly added. | | + | |**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** | With this button it is possbible to delete rows. | | + | |**4** |This button is used to delete rows.| |
- | | **5** | Here you can add new lines. | | + | |**5** |Here, new lines can be added.| |
- | If one wants to add a new row , a pop-up appears. Depending on the column type various fields are shown. For string , for example, a simple box . In Identity is a list of all users displayed . A list with true or false is displayed when using Boolean. | + | 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. |
- | <note important>If you select a star "*", this is seen as a Wildcard and any value will be seen as match. </note> | + | <note important>If an asterisk "*"is selected, this is treated as a wildcard and any value will be used for matching. </note> |
- | {{ en_fill_matrix_combined.png }} | + | [[:en:software:tim:en_fill_matrix_combined.png?id=en%3Asoftware%3Atim%3Arules_matrix&media=en:software:tim:en_fill_matrix_combined.png|{{ :en:software:tim:en_fill_matrix_combined.png }}]] |
+ | === Using the Matrix per Actionhandler === | ||
- | ===Using the matrix per Actionhandler=== | + | How to use the matrix per Actionhandler is described here: [[:en:software:tim:actionhandler:matrixhandler|MatrixHandler]] |
- | Using the matrix per Actionhandler is described here: [[en:software:tim:actionhandler:matrixhandler | MatrixHandler]] | + | === Evaluation Algorithm === |
- | ===Evaluationexamples=== | + | In principle, all of the cells within the matrix will be evaluated individually. |
- | The filled example matrix from the top is the base for these exampe evaluations. We have 3 searching values and one result column. The following table shows the results of some fictitious evaluations. The following rules are applied: | + | 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 line with the best match is seen as result. | + | |
- | * If more than one line match, the first match from the top is the result. | + | |
- | ^ Search Value 1 ^ Search Value2 ^ Search Value3 ^ Result^ | + | 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. |
- | | 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** | | + | |
+ | === 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 1^Search Value2^Search Value3^Result| | ||
+ | |Freising|true|20|**Group_1** | | ||
+ | |Freising|true|89|**wiki** | | ||
+ | |Freising|true|*|**wiki, Group_1** | | ||
+ | |Freising|false|20|**Group_1** | | ||
+ | |Freising|false|8267|**Group_1** | | ||
+ | |Freising|false|8|**wiki** | | ||
+ | |München|true|213|**Prozess Manager** | | ||
+ | |Timbuktu|false|89|**Prozess Manager** | | ||
+ | |München|true|8|**wiki** | | ||
+ | |München|true |*|**Prozess Manager, wiki** | | ||
+ | |*|*|89|**wiki, Prozess Manager** | | ||
+ | |||
+ | \\ | ||