Haley Expert Rules - Look-up tables (Decision Tables)
* Also including HaleyAuthority
HaleyAuthority provides reference, instance and look up tables, the latter of which are often referred to as decision tables by BR vendors. HaleyAuthority enables users to create lookup tables that allow for ranges of values or specific values to be identified for use in rule statements and conditions. Haley separates the rule logic from table representation, which allows the English logic to drive the use of the lookup tables, the rules to handle exceptions and be more self-documenting; both of which table-based approaches do not allow. Rules written in HaleyAuthority can be mapped to call external systems and data sources to look up specific information stored in other enterprise systems.
A table defines a function. The inputs to the function are the values in the rows and columns, and the outputs are the values in the cells.
HaleyAuthority employs three types of tables:
- Look-up table - Created by the user; the table defines a relationship between two concepts (e.g., "age" and "amount of coverage requested") and the output of a function. When a completed table is referenced, the inputs are used to select the first row and column that match the input criteria, and the contents of the cell at their intersection is returned.
- Relational table - Created automatically by HaleyAuthority when you create a relationship.
- Instance table - Created automatically by HaleyAuthority when you create a concept; the table shows all the instances of the concept.
Look-up tables
Look-up tables are a convenient way to define a set of relationships. The cells of the table all contain instances of the same concept and define the output of a function, which the table defines. The row headings of the table all belong to another concept, which is an input to the function, defined by the table. In two-dimensional tables, the column headings also belong to a third concept, which is a second input to the function defined by the table. When a completed table is referenced, the inputs are used to select the first row and column that match the input criteria, and the contents of the cell at their intersection is returned.
Below is an example of a look-up table. The inputs to the look-up (i.e., the dimensions of the table) are the applicant's age and the amount of coverage. Each dimension is split into ranges - each row heading is a range of ages and each column is a range of amounts. Each cell contains instances that are appropriate for a particular range of ages and a particular range of amounts.

In the above example, each cell had multiple criteria. Look-up tables can also be defined with single criteria as below, where the there is only a single value in each cell.


- Multiple values in one cell - This feature can be helpful in cases where multiple criteria are needed
- Empty cells You may choose not to enter data in cells if it suits the purpose of your look-up table. The addition of sub-rows creates blank cells in columns that do not have multiple values.

Relational tables
When you create a relationship, HaleyAuthority automatically builds a relational table. You can use this table to enter and edit facts for the specific relation.

Instance tables
HaleyAuthority automatically creates instance tables when you create a concept. The instance table displays the instances of the concept. You can add, edit and delete instances from an instance table. Every concept can have an instance table, except for the top-level "amount" concept and the "unit" concepts.
In the following example, uses the concept of "policy holder." Because a "policy holder" is a kind of person, "policy holder" inherited the relationships that had been set up for the entity "person." Therefore, the "policy holder" instance table includes columns with relationships already defined for "person," such as, "a person has an age," "a person has an occupation" and "a person has an income."

