30.2. "Add a Condition BRL fragment"

A Business Rule Language (BRL) fragment is a section of a rule created using the guided rules designer. The condition BRL fragment is the "WHEN" portion of the rule, and the action BRL fragment is the "THEN" portion of the rule. With this column option, you can define a condition BRL fragment to be used in the left ("WHEN") side of a rule. Simpler column types can refer to Facts and Fact fields bound in the BRL fragment and vice-versa.

The following example is a condition BRL fragment for a loan application:

図30.1 Add a condition BRL fragment with the embedded guided rules designer

Condition BRL Fragment column for guided decision tables designer

You can also select Free form DRL from the list of condition options to define the condition BRL fragment without the embedded guided rules designer.

図30.2 Add a condition BRL fragment with free form DRL

Condition BRL Fragment column for guided decision tables designer
Condition BRL Fragment column for guided decision tables designer
Template keys

When you add a field for a condition BRL fragment, one of the value options is Template key (as opposed to Literal or Formula). Template keys are placeholder variables that are interchanged with a specified value when the guided decision table is generated, and form separate columns in the table for each template key value specified. You can specify the default value of Template key in the Value options page. While Literal and Formula values are static in a decision table, Template key values can be modified as needed.

In the embedded guided rules designer, you can add a template key value to a field by selecting the Template key field option and entering the value in the editor in the format $key. For example, $age creates an $age column in the decision table.

In free form DRL, you can add a template key value to facts in the format @{key}. For example, Person( age > @{age} ) creates an $age column in the decision table.

The data type is String for new columns added using template keys.

Required column parameters

The following parameters are required in the Add a new column wizard to set up this column type:

  • Rule Modeller: Define the condition BRL fragment ("WHEN" portion) for the rule.
  • Header (description): Add header text for the column.
  • Hide column: Select this to hide the column, or clear this to display the column.