Things to Consider When Creating Business Rules - 17.1

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Discovery
Trillium > Trillium Quality
Version
17.1
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
Topic type
Overview
Administration
Configuration
Installation
Reference
How Do I
First publish date
2008

When you create a business rule, consider the context of the compliance tests you want to create, how they will be used, and the elements available to create the expression. Some questions to answer before you begin include:

When you create a business rule, consider the context of the compliance tests you want to create, how they will be used, and the elements available to create the expression. Some questions to answer before you begin include:

  • Do you want to apply the standard against an attribute or an entity.
  • Will the business rules be used for profiling (Discover) or standardizing (Develop) activities? For example, a profiling rule will determine pass or fail for standard. A standardizing rule applied to a Transformer conditional expression can be used to split the output based on passing and failing rows.
  • If creating an attribute business rule, do you want to the passing threshold to represent a row or value count?
Note: For more information about creating and using business rules, see Working with Business Rules. For information about using library business rules in a Quality project, click here.

Example rule scenario

Your business compliance standard states that when FIRST and LAST values are combined they should equal the value in FULL. To check this compliance, you would write a business rule to be run against all rows within an entity.

The following example details how to build an entity business rule that tests that the combination of two attributes (X, Y) equals the value of a third attribute (Z). For this example case, we will concatenate first and last name attributes and test the result against a third attribute which is the full name. The results of the test will show which rows in the entity passed the test and which rows failed.

Note: This example uses attributes named First, Last, and Full. The attribute names in your data will vary.
To create a business rule for this example
  1. From the Navigation View, right-click the entity to which you want to add the rule and selection Business rules > Add entity business rule or (for input entities in a Quality project) Tools > Business rules > Add entity business rule

    The Entity Business Rule window opens.

  2. In Name, type the name of the business rule; for example, " F IRST + LAST = FULL NAME".
  3. In Description, type a description of the rule and what it does; for example, "Check that FULL NAME = combination of FIRST and LAST." Click the button to open a text window to better work with long descriptions.
  4. In Passing threshold, enter the percentage of rows that you want to comply with this business rule. In this case, enter 100% because we need all rows to comply.
  5. In the Business Rule section, to the right of the Expression field, click the button.

    The Rule Expression field displays along with the expression elements available to build the rule.

  6. Under Choose expression elements from the lists below, in the left pane, click Functions.
  7. In the middle pane, click String.
  8. In the right pane, select the function by double-clicking CONCAT.

    The expression CONCAT(,) displays in the expression field.

  9. In the expression field, place your cursor before the comma (,).
  10. In the left pane click Attributes.

    The right pane populates with all available attributes in the current entity.

  11. In the right pane double-click First.

    The attribute named First is inserted into the expression:

  12. In the expression field, place your cursor after the comma.
  13. In the left pane click Attributes and then double-click Last.

    The attribute named Last is inserted into the expression:

  14. In the expression field, place the cursor after the last parenthesis and enter the equals sign (=). Alternately, you can click the = icon or select Operators > Comparison > = .

    Your expression should now look like:

  15. In the expression field, place the cursor after the = and select Full from the attributes in the right pane. Your expression should now look like:

  16. Click OK to save the expression, then click Finish to save the business rule.

To analyze the rule and view how many rows of data passed and failed the rule. After a rule is created you run the rule against the values in the entity by analyzing the rule. Then you drill down from the rule to view the failing rows.

  1. Open a List View of all entity business rules for the entity, including the rule you just created.
  2. Right-click the rule and select Re-analyze > Re-analyze selected rules.

    The scheduler bar displays.

  3. Click Now to run the analysis now.
  4. After rule analysis finishes, the List View should look like this:

    In this example, only 50% of the rows passed the business rule check; therefore, the Result is failed. (If your List View does not display these columns, right-click a column heading, select Choose Columns. In the Choose List view Columns window, select hidden fields to display and move column names within the Displayed fields list as necessary.)

  5. Double-click the business rule in the List View to display the rows that did not comply with this business rule (Failing Rows).