Define a computation rule
Computation rules are defined as part of the indicator definition in step two of the indicator definition wizard. Click here for a description on how to define an indicator.
This configuration is only required for indicators that shall be calculated based on the existing data about assets. This is not relevant for indicators that shall be manually set by users.
For global indicators, go to the option: Return numeric results via a database query.
-
This configuration of a computation rule returns how many references exist between objects. For example, the computation rule can calculate the number of devices that an application is deployed on or the number of organizations that use an application.
Roles defined for an object cannot be calculated with this indicator type. Roles are a relation between three different object classes: Role Type, the object (like Application). and Person (or Organization). For computation rules targeting roles, go to the option: Return numeric results via a database query
- In step 2 of the indicator definition wizard, click New > Create New Computation Rule.
- Define the following:
General tab:
- Name: Enter a unique name for the computation rule.
- Base Class: Select the object class with the number of relations to be counted.
- Attribute: Select the attribute that defines the relation.
- Object Computation Method: Select Count.
- Indicator Computation Method: Leave this field empty.
- Description: Provide a description that explains the meaning of the computation rule for administrative users.
Queries tab: Leave this tab empty.
Scaling tab: The values generated in a computation rule can be scaled in order to make them easier for users to interpret. You may not want to display the indicator that is the result of a computation rule to users because the numbers might not be comparable or meaningful to users.
Enter the relevant scaling values in the Result column. For each value in the Result column, enter a minimum value in the Min. Value column and a maximum value in the Max. Value column. If the fields are left blank, the value in the Result column is used as the default value for objects that don't match the scaling scheme.
Code Handler tab: Leave this tab empty.
-
This configuration of a computation rule interprets the numeric value of an object class property. A scale can be defined which translates the numeric value to an indicator range from low to high. It is recommended to define the scale aligned with the ranges for indicators set by users.
- In step 2 of the indicator definition wizard, click New > Create New Computation Rule.
- Define the following:
General tab:
- Name: Enter a unique name for the computation rule.
- Base Class: Select the object class to interpret the numeric result for.
- Attribute: Select the object class property of the base class returning the number.
- Object Computation Method: Select PropertyValue.
- Indicator Computation Method: Leave this field empty.
- Description: Provide a description that explains the meaning of the computation rule for administrative users.
Queries tab:
Leave this tab empty.
Scaling tab: The values generated in a computation rule can be scaled in order to make them easier for users to interpret. You may not want to display the indicator that is the result of a computation rule to users because the numbers might not be comparable or meaningful to users.
Enter the relevant scaling values in the Result column. For each value in the Result column, enter a minimum value in the Min. Value column and a maximum value in the Max. Value column. If the fields are left blank, the value in the Result column is used as the default value for objects that don't match the scaling scheme.
Code Handler tab:
Leave this tab empty.
-
This configuration of a computation rule calculates an overall indicator based on the indicator values defined for multiple indicator types. For example, a computation rule can calculate an overall criticality indicator based on multiple manually-defined indicators addressing criticality issues.
- In step 2 of the indicator definition wizard, click New > Create New Computation Rule.
- Define the following:
General tab:
- Name: Enter a unique name for the computation rule.
- Base Class: Select the object class for which you want to aggregate the indicator values.
- Attribute: Select the object class property of the base class returning the number.
- Object Computation Method: Leave this field empty.
- Indicator Computation Method: Select Avg to return the average value of the aggregated indicators, Sum to return the sum of the indicator values, Min to return the lowest indicator value among the aggregated indicators, or Max to return the highest indicator values among the aggregated indicators.
- Description: Provide a description that explains the meaning of the computation rule for administrative users.
Queries tab: Leave this tab empty.
Scaling tab: The values generated in a computation rule can be scaled in order to make them easier for users to interpret. You may not want to display the indicator that is the result of a computation rule to users because the numbers might not be comparable or meaningful to users.
Enter the relevant scaling values in the Result column. For each value in the Result column, enter a minimum value in the Min. Value column and a maximum value in the Max. Value column. If the fields are left blank, the value in the Result column is used as the default value for objects that don't match the scaling scheme.
Code Handler tab: Leave this tab empty.
- Close the editor.
- Select the new computation rule in the table and click New > Add Indicators.
- Select the indicators that shall be aggregated.
-
This configuration of a computation rule returns a query result as an indicator. The query must return a numeric result. A query is required for a global indicator or for complex relationships between objects. For example, the indicator can return the number of business capabilities supported by the applications in an application group. This requires two relationships: 1. The number of applications assigned to the application group. 2. The number of business capabilities supported by each application.
You must have knowledge about the underlying database structure in the Alfabet database to define a query. Contact Software GmbH Support for help to add an indicator that requires the definition of a query.
- In step 2 of the indicator definition wizard, click New > Create New Computation Rule.
- Define the following:
General tab:
- Name: Enter a unique name for the computation rule.
- Base Class: Select the object class that you want to define the indicator for. If the indicator is a global indicator, leave this field empty.
- Attribute: Leave this field empty.
- Object Computation Method: Leave this field empty.
- Indicator Computation Method: Select ValueByQuery.
- Description: Provide a description that explains the meaning of the computation rule for administrative users.
Queries tab:
Define the query within an XML element Query with an XML attribute Name for naming the query and an XML attribute Query for the query definition:
- <Query Name="UniqueName" Query="ValidQueryDefinition"/>
The query definition requires the following:
- The query can be a native SQL query or an Alfabet query. Alfabet queries must start with ALFABET_QUERY_500 and native SQL queries must start with ALFABET_QUERY_NATIVESQL.
- If the indicator is object-based, the parameter @BASE must be used in the query to refer to the current object. The parameter @Base is at runtime substituted with the REFSTR of the current object.
- The query must return a single row and a single column.
The following native SQL query is defined for an indicator that is assigned to application groups. It returns the number of organizations using the applications in the application group.
- <Query Name="ExampleQueryName"
- Query="ALFABET_QUERY_NATIVESQL
- SELECT COUNT(*)
- FROM RELATIONS rel
- INNER JOIN ORGAUNIT org ON rel.TOREF = org.REFSTR
- INNER JOIN APPLICATION app ON rel.FROMREF = app.REFSTR
- INNER JOIN RELATIONS relag ON relag.FROMREF = app.REFSTR
- WHERE relag.TOREF =@BASE"
- />
Scaling tab: The values generated in a computation rule can be scaled in order to make them easier for users to interpret. You may not want to display the indicator that is the result of a computation rule to users because the numbers might not be comparable or meaningful to users.
Enter the relevant scaling values in the Result column. For each value in the Result column, enter a minimum value in the Min. Value column and a maximum value in the Max. Value column. If the fields are left blank, the value in the Result column is used as the default value for objects that don't match the scaling scheme.
Code Handler tab: Leave this tab empty.