Decision Tables Overview

A decision table presents values in rows and columns. Each row describes a situation when given inputs (columns) result in certain outputs (also columns). In other words, a decision matrix displays decisions based on certain criteria. You can create a decision table in Higson (so-called a parameter), where you define input and output columns and then populate data with values in rows.

If you are new to Higson decision tables, you may want to read the introductory section Introduction to Decision Tables.

Since version 4.3, Higson Studio also includes an AI Assistant that can help you conversationally design and refine decision tables. To learn how to enable it, see AI Assistant Configuration, and for usage instructions see AI Features in Decision Tables.

In order to see all Decision Tables select Decision Tables in the Main Toolbar.

After that, when you enter Decision tables, you will see a screen of Decision Tables

No. Column name Description
1. Name Full name of Decision table.
2. Source Data source in the matrix.
3. Tags List of all Tags assigned to the Decision table
4. Profile/Region Profile and Region the decision table is assigned to.
5. Input levels List of input levels for business data.
6. Last change The last modification date of the decision table.
7. Actions List of quick access actions. Remove action deletes decision table

The decision tables list view depends on the selected profile. If a profile is selected, both global items and items assigned to the selected profile are displayed. If no profile is selected (not-chosen), only global items are visible.

Elements modified in current session are marked with pink dot:

On this screen, you can apply Filters to search for specific decision table or to narrow down the number of displayed decision tables. You can also perform actions on one or multiple decision tables.

You can see All Actions available for the decision tables below:

No. Action Description
1 Checkboxes Select the top checkbox to select all decision tables in the view or select individual checkboxes to group decision tables for actions 5a, 5b, 5c, 5f, 5g, 5h, 5i, 5j, 5k.
2 + Add decision tables Opens a step-by-step decision tables wizard. Allows you to create new decision tables.
3 Upload Allows importing decision tables from a ZIP or xlsx file.
4 Hide filters Hides or reveals the Filters bar accordingly. If Filter bar is visible, then action Hide filters is available. If it’s hidden, then action Show filters is available.
5 More actions The drop-down menu that contains actions 5a-5k. Bear in mind that actions 5a, 5b, 5c, 5f, 5g, 5h, 5i, 5j, 5k are available only if at least one decision table is selected (at least one checkbox is checked). Otherwise, the mentioned actions will be greyed out (see picture below the table).
5a Mass export to XLSx Downloads a ZIP file that contains XLSX file and files with decision tables body.
5b Extract codes Downloads an XLSX file that contains decision tables extract.
5c Download codes Download a TXT file with decision tables names.
5d Select from file Allows uploading a TXT file with decision tables. After uploading, all decision tables present in the file will be selected.
5e Compare with extract Allows uploading an XLSX file with decision tables extract. Makes comparison between the provided file and the environment.
5f Assign profile Assign profile to selected decision tables.
5g Make global Make global selected decision tables.
5h Add region Adds regions to all selected decision tables.
5i Remove region Removes regions from all selected decision tables.
5j Manage tags Allows adding/removing tags to/from selected decision tables.
5k Remove Delete all selected decision tables.

Some of the actions in the More actions drop-down menu are grayed out, when no decision tables are selected

You can see all Filters available for decision tables below:

No. Filter name Description
1 Search text field Filter by any string provided by the user.
2 Source Filter by data source for the matrix.
3 Tags Filter by assigned tags; only tags assigned to at least one decision table are visible for selection.
4 Region Filter by assigned regions; only regions assigned to at least one decision table are visible for selection.
5 Date range Filter by last change date in format YYYY/MM/DD - YYYY/MM/DD.
6 Current profile only Check this box to limit the table view to those assigned to the currently selected profile. Otherwise, global tables will also be displayed.

Add Decision Table#

If you want to add Decision tables follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Choose + Add Decision table in All actions bar.

    a. Choosing + Add Decision table opens a step-by-step wizard.

  3. In step 1. Name, you need to provide a unique decision table code/name. Name can contain only characters from collection a-z; 0-9; “.”; “-”; “_” and it can’t start with “-”.

    a. If you changed your mind and don’t want to create a new decision table, you can choose Cancel in step 1. Name.

  4. Choose Next.

    a. If you enter illegal characters, then the validation error will appear

    b. If the name you provided is already used by another decision table, then a pop-up dialog will appear, either close the pop-up by clicking Cancel or View existing decision table, that will redirect you to the appropriate Decision table and close the Decision table wizard.

  5. In step 2. Profile you may assign decision table to a profile by selecting a profile from drop down list or create a global table by checking No profile (global). Assigning this table to a profile will ensure that only users with permissions for that profile can access it. Global decision tables will be visible regardless of profile permissions.

  1. In step 3. Definition you may optionally add a description and assign tags. You must choose a data source for a matrix. External source and AI Model Source are described later in this document.

Additional options available to configure a decision table are described in the table below.

No. Name Description
1 Match required If checked: when in matrix value won’t be found, it will return an error; if checked and no match is found in the matrix, the decision table will return null.
2 Distinct filters Removes duplicated records from the result list.
3 In memory index If not checked, then with every call to that decision table, its definition and matrix must be reloaded from the database. This checkbox is flagged if the decision table should be stored in the application cache.
4 Dictionary value To define the decision table as a dictionary, there is a checkbox “Dictionary” that needs to be marked. See Dictionary table for details.

a. The match required and In-memory flags are checked by default. Unchecking the In-memory checkbox means that you will not be able to use the matchers, union, blob and asterisk. The confirmation pop-up will appear.

  1. Choose Next.

  2. In step 4. Levels you may add IN and OUT columns, but this is not necessary to proceed to the next step.

    When selecting the “date” value type, be sure to use the correct recording format: yyyy-MM-dd.

    When selecting the “data time” value type, be sure to use the correct notation format: yyyy-MM-dd HH:mm:ss

  3. Choose Next.

  4. In step 5. Matrix you may add matrix cells, but this is not necessary to proceed to the next step.

  5. Choose Save changes.

    a. Decision table with data you provided is created. You will be redirected to Decision table’s details screen.

Upload Decision Table#

If you want to upload decision tables from a ZIP file, follow these steps:

  1. Choose Decision Tables in the Main Toolbar.

  2. Choose Upload in the “All Actions” bar.

    a. Choosing Upload brings up the Import decision table screen.

  3. Drag and drop the desired file or Click to upload a file and choose file in File Explorer.

    a. If you choose a file with an extension other than ZIP, then a validation error will pop up.

  4. After uploading, the upload report appears.

Mass Export to XLSX#

If you want to download one or more decision tables, follow these steps:

  1. Choose Decision Tables in the Main Toolbar.

  2. Select one or more.

    a. Select the top checkbox to select all decision tables in the view, or select individual checkboxes to select one or multiple

  3. From the drop-down menu More actions: choose Mass export to XLSx.

    a. If action Mass export to XLSx is grayed out, it means that no decision tables have been selected.

    b. Choosing Mass export to XLSx downloads a ZIP file that contains files with decision tables.

Details of zip Sheet Data contains matrix.

Sheet Configuration contains details of levels and definition.

Sheet Mark contains information on object type, it is used for validation when uploading file into Higson Studio.

Extract Codes#

If you want to extract one or more decision tables, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Select one or more decision tables

    a. Select the top checkbox to select all decision tables in the view or select individual checkboxes to select one or multiple.

  3. From drop-down menu More actions choose Extract codes

    a. If action Extract codes is greyed out, it means that no decision tables have been selected.

    b. Selecting Extract codes downloads a XLSX file that contains Code, SHA and Region columns

Download Codes#

If you want to download one or more decision tables codes, follow these steps:

  1. Choose decision table in Main toolbar.

  2. Select one or more decision tables.

    a. Select the top checkbox to select all decision tables in the view, or select individual checkboxes to select one or multiple

  3. From drop-down menu More actions choose Download codes

    a. If Download codes action is greyed out, it means that no decision tables have been selected.

    b. Selecting Download codes downloads a TXT file that contains decision tables’ codes

Select from File#

If you want to select one or more Decision tables from the file, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. From drop-down menu More actions choose Select from file

    a. Choosing Select from file brings up the Select from file screen

  3. Drag and drop the desired file or Click to upload a file and choose file in File explorer.

    a. Correct TXT file should look like this:

    b. If you choose a file with an extension other than TXT, then a validation error will pop up.

  4. When the progress bar reaches 100%, you will be informed which decision tables will be selected.

  5. Choose Select.

    a. All decision tables that were present in the Selected Elements table get selected.

Compare with Extract#

Makes a comparison between the file and the environment, and gives information on which elements are the same, and which changes are only in the file or only in the environment.

  1. Choose Decision tables in Main toolbar.

  2. From drop-down menu More actions choose Compare with extract.

    a. Choosing Compare with extract brings up the Compare with extract screen.

  3. Drag and drop the desired file or Click to upload a file and choose file in the File explorer.

    a. Correct XLS/XLSX file should look like this

    b. If you choose a file with extension other than XLS/XLSX, then validation error will pop up

  4. When the import is successful you will be informed about it with the appropriate status Upload succesful. You will be informed about the status of all decision tables present in the environment and the extract file you provided.

  5. In the Select section (visible below the table with decision table status), choose which Decision tables will be selected.

    a. You can select multiple options.

    b. Matching: decision tables that are equal between the environment and the extract file will be selected.

    c. Different regions: decision tables that are equal but with different regions between the environment and the extract file will be selected.

    d. Different name: decision tables that are equal but with different names between the environment and the extract file will be selected.

    e. Missing from extract: decision tables that are present in the environment but absent from the extract file will be selected.

  6. Choose the Select Button.

    a. If the Select button is grayed out, it means that no checkboxes were selected in step 5.

    b. All Decision Tables that match the criteria provided in step 5 are selected.

Assign Profile#

If you want to assign a profile to one or more Decision Tables, follow these steps:

  1. Select Decision Tables from the main toolbar.

  2. Select the Decision Tables without an assigned profile by checking the boxes on the left side of the list.

  3. From the More Actions drop-down menu, choose Assign Profile.

    a. Selecting Assign Profile opens the Assign Profile screen.

  4. Select the profile to which you want to assign the Decision Table and confirm by clicking Change.

On the Decision Tables list view, a profile entry will appear for the assigned Decision Tables. The view will also be updated to reflect the selected profile.

Make Global#

If you want to detach one or more Decision Tables from profile, follow these steps:

  1. Select Decision Tables from the main toolbar.

  2. Select the Decision Tables with an assigned profile by checking the boxes on the left side of the list.

  3. From the More Actions drop-down menu, choose Make Global.

    a. The pop up will appear.

  1. Click Confirm.

On the Decision Tables list view, a profile entry will disappear for the selected Decision Tables. The view will also be updated to global.

Add Region#

If you want to add a region to one or more decision tables, follow these steps:

  1. Choose Decision Tables in the Main Toolbar.

  2. Select one or more decision tables without a Region.

    a. Select the top checkbox to select all decision tables in the view or select individual checkboxes to select one or multiple decision tables.

  3. From the drop-down menu More actions, choose Add region.

    a. If action Add region is grayed out, it means that no decision tables have been selected.

    b. Choosing Add Region brings up the Manage Versioning screen.

  4. Select a Region and one or more versions.

  5. Select Change.

  6. The region has been assigned to the decision tables

Remove Region#

If you want to remove a region from one or more decision tables, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Select one or more Decision tables with a Region.

    a. Select the top checkbox to select all decision tables in the view or select individual checkboxes to select one or multiple.

  3. From drop-down menu More actions choose Remove region.

    a. If action Remove region is greyed out, it means that no function has been selected.

    b. After choosing Remove region action, confirmation pop-up will appear.

  4. Choose Confirm.

    a. Regions are being removed from all selected decision tables.

Manage Tags#

If you want to manage tags from one or more decision tables, follow these steps:

  1. Select the decision tables on the main toolbar.

  2. Select one or more untagged decision tables.

  3. From the More Actions drop-down menu, select Manage Tags.

  4. Select the tags you are interested in and click Save.

Remove Decision Table#

If you want to delete one or more decision tables, follow the steps below:

  1. Choose the Decision tables in the Main toolbar.

  2. Select one or more decision tables.

    a. Select the top checkbox to select all decision tables in the view, or select individual checkboxes to select one or multiple

  3. From the drop-down menu More actions, choose Remove.

    a. If action Remove is grayed out, it means that no decision tables have been selected.

    b. After choosing Remove action, a confirmation pop-up will appear.

  4. Choose Confirm.

  5. All selected decision tables are deleted from the environment

Details View#

You can access decision table details by left-clicking on the specific decision table in the List of all decision tables. The decision tables details screen contains all information about the decision tables, including their description, assigned regions, tags, and others.

And you can see the available actions below:

No. Name Description
1 Bookmarks Adds decision table to bookmarks.
2 Name Name of decision table
3 Copy Copy to clipboard
4 Profile Assigned profile.
5 Region/Version Assigned region and version
6 Duplicate Allows to duplicate decision table.
7 Download table Downloads XLSX file with decision table.
8 Upload table Allows to upload decision table from xlsx file.
9 More actions Drop-down list that contains actions 9a-9h.
9a Shows history Opens a new screen with a table of all modifications made on the decision table.
9b Rename Allows you to change the name.
9c Assign profile Assigns the decision table to a profile. Assigning the decision table to a profile will ensure that only users with permissions for that profile can access it.
9d Make global Makes the decision table global. Global decision tables are visible regardless of profile permissions.
9e Attach/Detach Allows you to add/remove a region to/from the Decision table. Attach region is available if there are no regions added to the Decision table. Detach region is available if there is a region added to the Decision table.
9f Create Alias Creates a copy of the decision table with its own code.
9g Find usages Redirects you to Find usages search where you may find every reference to that decision table.
9h Delete Action removes the decision table.

Left-click on LEVELS AND DEFINITION to see more details about the Decision table.

No. Name Description
1 Definition section Definition of Decision table. Contains information such as:
- Description of Decision table
- Assigned Tags
- Created Aliases
2 Levels section Levels of Decision table. Contains information about created IN Columns and OUT Columns.
3 IN Columns section IN Columns table contains all IN Columns created in Decision table.
3a Unique Code Unique Code of IN Column.
3b Column Name Name of IN Column.
3c Value Type Informs about Value Type of IN Column.
3d Value Source Value Source of IN Column.
3e Matcher Informs about the selected matcher for IN Column. To learn more about matchers go here.
3f Union Informs if Union checkbox was selected for IN Column.
4 OUT Columns section OUT Columns table contains all OUT Columns created in Decision table.
4a Unique Code Unique Code of OUT Column.
4b Column Name Name of OUT Column.
4c Value Type Informs about Value Type of OUT Column.
4d Blob Informs if Blob checkbox was selected for OUT Column.
4e Tab Informs if Tab checkbox was selected for OUT Column.

Value Source#

The Value Source field is used to define the source of a value for an IN level in a decision table. It can accept two types of references:

  • context paths,
  • functions.

Context Paths in the Value Source Field

If the value in the IN level should be read from the context, an appropriate context path must be provided, for example: quote.driver.age. In this example, the value of the age attribute is read from the Driver type, which is a subtype of the Quote type.

EXAMPLE

For the following data taken from the context:

quote.driver.gender = F

quote.driver.age = 20

the resulting Tariff’s factor is 0.507.

Functions in the Value Source Field

The Value Source field also supports references to functions using the $f notation. In this case, the value evaluated in the decision matrix is the result of a function execution.

Duplicate Decision Table#

If you want to duplicate specific Decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you wish to duplicate.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. Choose Duplicate in Available actions.

    a. Choosing Duplicate brings up the Duplicate table screen.

  4. Enter unique Decision table name. Name can contain only characters from collection a-z; 0-9; “.”; “-”; “_” and it can’t start with “-”.

  5. Choose Save changes.

    a. If you entered illegal characters, then name filed will highlight with red color.

    b. If the name you provided is already used by another Decision table, then pop-up dialog will appear. You can either close the pop-up by clicking Cancel or you can click View existing Decision table, that will redirect you to the appropriate Decision table.

Download Decision Table#

If you want to download a specific Decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you wish to download.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. Choose Download in Available actions.

    a. Choosing Download downloads an XLSX file that contains data of Decision table.

Show History#

If you want to check all modifications made on Decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you want to check.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. From drop-down menu More actions choose Show history.

    a. Choosing Show history brings up the Decision table history screen.

    No. Column name Description
    1 Operation Type Type of operation made on the Decision table.
    2 Message Deatailed information on operation.
    3 Author User’s login that made an operation.
    4 Modification Date Date of the published session that made an operation.
    5 Region Region and version assigned to the Decision table at the time of modification.
    6 Digest Decision table’s hash.
    7 Actions View redirects to an archived version of the Decision table. In this screen, you can choose Restore to restore that version of the Decision table.

Rename#

If you want to rename a Decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you wish to rename.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. From drop-down menu More actions choose Rename.

    a. The Highlighted border around the Decision table name indicates that the name is editable.

  4. Enter unique Decision table name. Name can contain only characters from collection a-z; 0-9; “.”; “-”; “_” and it can’t start with “-”.

  5. Choose Save name.

    a. If you enter illegal characters, then the rename field will highlight with red color.

    b. If the name you provided is already used by another Decision table, then pop-up dialog will appear. You can either close the pop-up by clicking Cancel or you can click View existing decision table, that will redirect you to the appropriate Decision table.

Attach Region#

To attach a decision table to a region, decision table must first be assigned to a profile. A region belongs to a profile.

If you want to attach a region to a specific Decision table from Decision table details level, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on Decision table with no region assigned you want to attach a region.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. From drop-down menu More actions choose Attach region

    a. If Detach region action is available, it means that the Decision table has assigned the region already. You need to Detach region (hyperlink) before you will be able to attach a new region.

    b. Choosing Attach region brings up Manage versioning screen.

  4. Select Region and one or more Version.

  5. Choose Change

    a. The Region is being assigned to the Decision table.

Detach Region#

If you want to detach a region from a specific Decision table from Decision table details level, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table with a region assigned you want to detach region.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. From drop-down menu More actions choose Detach region.

    a. If Attach region action is available, it means that the Decision table has no region assigned.

    b. After choosing Detach region action, confirmation pop-up will appear.

  4. Choose Confirm.

    a. The Region is being detached from the Decision table.

Create Alias#

If you want to create an alias to specific Decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on Decision table you want to create alias.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. From drop-down menu More actions choose Create alias.

    a. Choosing Create alias brings up the Create alias screen.

  4. Enter unique alias name. Name can contain only characters from collection a-z; 0-9; “.”; “-”; “_” and it can’t start with “-”.

  5. Choose Save change.

    a. If you enter illegal characters, then the rename field will highlight with red color.

    b. If the name you provided is already used by another Decision table, then a pop-up message will appear.

Find Usages#

If you want to check where Decision table is used, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you want to check.

    a. Left-clicking on Decision table opens Decision table details screen.

From drop-down menu More actions choose Find usages.

a. Choosing Find usages brings up the Find usages screen.

No. Column name Description
1 Element Type Type of element that uses this Decision table.
2 Element Name Name of the element that uses this Decision table.
3 Field Informs about the type of field where the Decision table is used.
4 Value Value of the element that uses this Decision table. This column is filled only for Attribute value element; for other elements, this column is empty.

Remove (Details View)#

If you want to delete specific Decision table from Decision table details level, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you wish to remove.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. From drop-down menu More actions choose Remove.

    a. After choosing Remove action, confirmation pop-up will appear.

  4. Choose Confirm.

    a. The Decision table is deleted from the environment.

Matrix#

The Matrix section displays the decision table data in rows and columns. The section header shows the current number of rows.

The following actions are available in the Matrix section toolbar:

No. Action Description
1 Lock IN columns Locks the IN columns in place so they remain visible while scrolling horizontally through the matrix.
2 Columns Opens a panel for showing or hiding individual columns in the matrix view.
3 Only in session Toggle switch. When enabled, any changes made to the matrix are applied only for the duration of the current session and are not persisted.
4 Download matrix Downloads the matrix data as an XLSX file.
5 Upload matrix Uploads matrix data from an XLSX file, replacing the current matrix content.
6 Edit Activates edit mode for the matrix. Highlighted borders indicate that edit mode is active.
7 Expand Expands the matrix to full screen for a larger working area.

Each row in the matrix that has been modified in the current session is preceded by a colored dot indicator. Each column has a Search field that allows you to filter rows by the values in that column.

Edit Matrix#

If you want to edit matrix in a specific decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you wish to edit.

    a. Left-clicking on the Decision table opens the details screen.

  3. Choose Edit in Matrix section.

    a. Highlighted borders indicate that the edit mode is active.

  4. Edit any data you need.

  5. Choose Save changes to save all changes made in the Decision table.

    a. Cancel reverts all changes.

Edit Levels and Definition#

If you want to edit levels or definition in a specific decision table, follow these steps:

  1. Choose Decision tables in Main toolbar.

  2. Left-click on the Decision table you wish to edit.

    a. Left-clicking on Decision table opens Decision table details screen.

  3. Expand LEVELS AND DEFINITION

  4. Choose Edit in Definition section or in Levels section. Only one section can be edited at given time.

    a. Edit mode for Definition section.

    b. Edit mode for Levels section.

  5. Edit any data you need.

  6. Choose Save changes to save all changes made in the Decision table.

    a. Cancel reverts all changes.

Decision tables - Cascade call#

In each OUT cell of the decision table, the value can be specified in three ways:

  • as a literal
  • as a value retrieved from another decision table (cascade get)
  • as a value retrieved from a function (cascade call)
Cascade call - how to call#

In the cell, enter an expression that means returning the result from the specified function.

Cascade expression Description
$f fun execution of a function named “fun”.
$f fun (1, 5, active) Passing arguments to the function always as strings, meaning the function will receive the arguments: "1", "5", "active".
$f fun (1; 5; active) The argument separator can also be a semicolon. If a semicolon appears in the expression, Higson will treat it as the argument separator; otherwise, the separator will be a comma.
$f fun (ctx:insured.age, 5) Passing arguments coming from the context. The function will receive one argument retrieved using: ctx.get("insured.age").
$f fun [idx] If the function returns a composite object of type ParamValue, MultiValue, Java array, Collection, or Iterable, only the element at index idx will be retrieved.
$f fun [code] If the function returns a composite object of type ParamValue, MultiValue, or Map, only the value associated with the key code will be retrieved.
$f fun (1, ctx:risk.code) [factor] Example: one argument passed as a literal, the second coming from context, and additionally retrieving the result under the key “factor”.
Cascade call – implicit type conversion#

If we use a cascade call expression to function F returning an object of any type T2 in decision table P at level T1, then:

  • cascade call will internally return an object of type T2
  • then T2 will be converted to HolderT1
  • the conversion will take place according to the logic of the methods from the family: _dec(), _num(), _int(), _str() , _date(), _bool()
  • the conversion may be lossy
Cascade call – example#

Function calc.factors:

age = _num(age)
var factor1 = 1.0 + age / 100
var factor2 = 3.0 + age / 10

// function returns a map
return util.map(
    'f1', factor1,
    'f2', factor2
)

Decision table client.factors:

Result of get( “client.factors”, ctx ):

insured.age factor1 factor2
22 1.0 3.0
37 1.1 6.7
44 1.2 8
61 1.65 9.5
Cascade get – invocation method#

In a cell, we enter an expression that represents returning a value from another decision table.

Cascade expression Description
$p decisionTable.name Returns the value of a decision table from the first cell; equivalent to calling:
higson.get("decisionTable.name", ctx).getHolder()
$p decisionTable.name [idx] Returns the value of a decision table from the output level at index idx; equivalent to calling:
higson.get("decisionTable.name", ctx).getHolder(idx)
$p decisionTable.name [code] Returns the value of a decision table from the output level with the code code; equivalent to calling:
higson.get("decisionTable.name", ctx).getHolder(code)
Cascade get - implicit type conversion#

If, in decision table P1 at level T1, we use the cascade get expression to decision table P2 at level T2, then:

  • cascade get will internally return a Holder of type T2
  • then HolderT2 will be converted to HolderT1
  • the conversion will take place according to the logic of one of the functions: _dec(), _num(), _int(), _str(), _date(), _bool()
  • the conversion may be lossy
Cascade get - example#

Decision table decisionTable.p1:

Decision table decisionTable.p2:

Result of get(decisionTabl.p2):

ctx: risk.code decisionTable.p2 OUT1 OUT2
A 100 1 2
B 600 1 6.1
C 7 700 7.2

When retrieving values for decisionTable.p2, the same context is used as for the initial decisionTable.p1.

A cascade calls cycle is not permitted: P1 -> P2 -> …. -> P1

Decision Table Search Mechanism#

There are two mechanisms for searching the matrix of a decision table: best match and union match.

Best match#

Best match is the default search mode. It searches the In levels sequentially, looking for an exact match. The asterisk (*) is considered only if no exact match is found at a given level. In this mode, subsequent levels have progressively lower priority. Therefore, the order of the columns affects the search result.

Let’s examine this using the following decision table:

in1 in2 out1
* 1 100
b * 200
c 1 300

EXAMPLE

context values: In1 = b, In2 = 1

An exact match for value In1 = b is found at the In1 level, so for that row we search the In2 level for the value 1. No exact match is found, but there is an asterisk, so the result in best match mode is 200.

Union match#

In union match mode, asterisk(*) is treated the same as an exact match. To enable uniion mode select union checkbox in the in-levels section.

EXAMPLE

context values: In1 = b, In2 = 1

An exact match for value In1 = b is found at the In1 level, but there is also an asterisk so both rows are taken into account. We then search the In2 level for the value 1. Both asterisk(*) and an exact match are found, so the result in union mode is 100 and 200. In this case, both rows are returned.