Matrix Rule
  • Updated on 05 Mar 2019
  • 2 minutes to read
  • Print
  • Dark

Matrix Rule

  • Print
  • Dark

This document demonstrates how to create and use a Matrix Rule in Decisions .Matrix Rules are different from Truth Tables in that Matrix Rules can only output one value.

The image below is a completed example of a Matrix Rule that evaluates an animal type (dog or cat), animal breed and animal age. The Matrix Rule result will output a monthly insurance premium.

Configure the Rule:
In this example create a Matrix Rule that evaluates three different inputs. The inputs will evaluate the data and then output the proper String value. Begin in the Designer Folder and select Create Rule and choose Matrix Rule . In the resulting window, name the Rule and select Create to open the Matrix Rule designer. Note: Observe that it is slightly different than Rule Designer in Decisions . On the work-space, there is a matrix preset for to build horizontal and vertical steps to evaluate data. Configure the Matrix Rule using the properties tab on the right side of the Rule Designer. 
Select Setup Input Data above the workspace. 

Select Setup Input data, by selecting that action button on the top right of the designer**.** Add input data to the rule and select close to save the data. 

First, hover over the ADD RULE row on the workspace and select the (+) symbol 

After ADD RULE is selected the Add After steps show as seen in the image below (Figure 5).  Only rules based on the Data are offered (i.e. Dates, List, Numbers, Text). 

Seatch for the StringMatch Step step from Add After [Catalog] > Data > Text category, and select Add .

Once this rule is added an Edit Rule dialog will appear, allowing the designer to configure the rule**.** Rename the rule to a relevant name for what the rule is looking for. Possible Matches is what the rule will compare the inputs to. Select the Input from a flow and choose an animal type. 

On each Possible Match more steps can be applied from the Add Step window by selecting the (+) symbol. Select (+) next to Dog.

Add another String Match Step Rule. Configure it as follows, select close to save. 

Select the (+) next to Cat and add another String Match Step Rule and configure it as follows, then close to save. 

The matrix rule should look like the following screenshot. To configure the columns select the (+) next to ADD RULE.

The column rule will evaluate the animals age. Choose the Number Range rule located in All Rules > Data > Numbers. Rename the rule and define the Number Ranges as follows, close to save. 

Within the Properties panel, under Output Data , change the Output Type to String. The Matrix rule should look like the below screenshot.

Within the blank spaces select the pencil icon to edit the Output for that specific column and row. After filling out all the empty spaces, select Debug.

The Debugger opens and allows the tester to enter Dynamic Data . This Matrix Rule can live within a flow and use forms or other ways to input data, for testing purposes this example is solely focused on creating the Matrix Rule. Once the data is entered select Run.

The Matrix Rule runs and gives the output of from the corresponding input. The data entered was a Beagle , age 3 .

Was this article helpful?