How comparators for the string list attribute work

 

Feature coming soon

The following table outlines the different comparators that are available if you selected the String List attribute in your decision table. Each comparator has two options of execution: In sequence and Any sequence. 
  • In sequence – All input values used for decision table execution must follow the same order as defined in the decision table rules.
  • Any sequence – All input values used for decision table execution must be available in the set of values defined in the decision table rules, irrespective of their order.
Comparator How it works When condition results in True  When condition results in False 
Contains all in sequence

The input values used for decision table execution contain all the values that are defined in one of the rules of the decision table. Additionally, the input values must follow the order of values that are defined in the decision table rule. That is, the values in one of the rules of decision table is an exact subset of the input values.

This comparator is best suited when the number of values that enter the decision table is typically larger than what is defined in the table.

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Life, Auto
  • Input values used for decision table execution: Home, Auto, Health, Life
  • Values defined in one of the rules of the decision table: Life, Auto

Does not contain all in sequence

The input values used for decision table execution contain at least one missing value or contains all the values in a different sequence as compared to the values that are defined in one of the rules of the decision table.

  • Input values used for decision table execution:
    Home, Health, Life
    (OR)
    Home, Auto, Health, Life
  • Values defined in one of the rules of the decision table: Life, Auto
  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Life, Auto
Contains all

The input values used for decision table execution contain all the values that are defined in one of the rules of the decision table. However, the input values do not have to follow the order of values that are defined in the decision table rule. That is, the values in one of the rules of the decision table is a subset of the input values.

This comparator is best suited when the number of values that enter the decision table is typically larger than what is defined in the table.

  • Input values used for decision table execution: Home, Life, Auto, Health.
  • Values defined in one of the rules of the decision table: Health, Life
  • Input values used for decision table execution: Home, Life, Auto, Health.
  • Values defined in one of the rules of the decision table: Health, Crop
Does not contain all

The input values used for decision table execution contain at least one missing value compared to the values that are defined in one of the rules of the decision table. 

  • Input values used for decision table execution:
    Home, Life, Auto, Health
    (OR) 
    Health
  • Values defined in one of the rules of the decision table: Health, Crop
  • Input values used for decision table execution: Home, Life, Auto, Health.
  • Values defined in one of the rules of the decision table: Health, Life
Equals

The input values used for decision table execution match exactly with the values that are defined in one of the rules of the decision table. Additionally, the input values must follow the same order as in one of the rules of the decision table. 

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Life, Auto, Health
  • Input values used for decision table execution: Home, Auto, Health, Life
  • Values defined in one of the rules of the decision table: Home, Life, Auto, Health
Not equals

The input values used for decision table execution contain additional values, missing values, or all values in a different order as compared to the values that are defined in one of the rules of the decision table.

  • Input values used for decision table execution:
    Auto, Health, Life
    (OR) Home, Auto, Health, Life
  • Values defined in one of the rules of the decision table: Home, Life, Auto, Health
  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Life, Auto, Health
Contains exactly

The input values used for decision table execution match the values that are defined in one of the rules of the decision table. However, the input values do not have to follow the order of values that are defined in the decision table rule.

The number of values and the number of times a value repeats must match exactly between the input values and the values defined in one of the rules of the decision table. In example 2, note that the number of values defined in decision table is give and the value ‘Auto’ repeats twice. The condition returns true only if the input value contains five elements, with Auto occurring twice. 

Example 1: 

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life


Example 2:

  • Input values used for decision table execution: Home, Life, Auto, Health, Auto
  • Values defined in one of the rules of the decision table: Home, Auto, Life, Auto, Health

Example 1: 

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Crop

Example 2:

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Auto, Life, Auto, Health

Does not contain exactly

The input values used for decision table execution must not contain all values that are defined in one of the rows of decision table. That is, one or more values must be missing in the input value list.

 

The number of values and the number of times a value repeats must not match between the input values and the values defined in one of the rules of the decision table. In example 2, note that the number of values defined in decision table is give and the value ‘Auto’ repeats twice. The condition returns true only if the input value contains less or more than five elements.

Example 1: 

  • Input values used for decision table execution:
    Home, Life, Auto, Health
    (OR)
    Crop, Auto, Home
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Crop

Example 2:

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Auto, Life, Auto, Health

Example 1: 

  • Input values used for decision table execution: Home, Life, Auto, Health
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life

Example 2:

  • Input values used for decision table execution: Home, Life, Auto, Health, Auto
  • Values defined in one of the rules of the decision table: Home, Auto, Life, Auto, Health
Is subsequence of

The input values used for decision table execution must be an exact subset of the values that are defined in one of the rows of decision table. That is, all the input values must be available in the same order without any breaks in one of the rules of the decision table. The values must be continuous and must not be broken by any other value.

Note: An empty input list is not considered a subsequence.
  • Input values used for decision table execution: Health, Auto
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life
  • Input values used for decision table execution:
    Health, Auto
    (OR)
    Health, Crop
  • Values defined in one of the rules of the decision table: Home, Auto, Health, Life
Is not a subsequence of

The input values used for decision table execution must contain additional values, all values in a different sequence, or all values in sequence, but broken by other values as compared to values that are defined in one of the rows of decision table.

Note: An empty input list is considered ‘Not a subsequence of’ the values of a decision table rule. That is, when the input value is an empty list, the input is not a subsequence of the decision table values. 
  • Input values used for decision table execution:
    Health, Crop
    (OR)
    Health, Auto
    (OR)
    Home, Travel, Health
    (OR)
    <<No value>>
  • Values defined in one of the rules of the decision table: Home, Auto, Health, Life
  • Input values used for decision table execution: Health, Auto
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life
Is subset of

The input values used for decision table execution must be a subset of the values that are defined in one of the rules of the decision table. However, the order of the values do not have to match. 

This comparator is best suited when the values defined in decision table is a larger, universal set of the values that are expected from Architect, and when the sequence is not relevant. 

Note: An empty input list is not considered a subset.
  • Input values used for decision table execution: Home, Life
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life
  • Input values used for decision table execution: Health, Crop
  • Values defined in one of the rules of the decision table: Home, Auto, Health, Life
Is not subset of

The input values used for decision table execution must contain at least one value that is not defined in one of the rules of the decision table.

Note: An empty list is not a subset

Note: An empty input list is considered ‘Not a subset of’ the values of a decision table rule. That is, when the input value is an empty list, the input is not a subset of the decision table values. 
  • Input values used for decision table execution:
    Health, Crop
    (OR)
    Travel
    (OR)
    <<No value>>

  • Values defined in one of the rules of the decision table: Home, Auto, Health, Life
  • Input values used for decision table execution: Home, Life
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life
Contains any

The input values used for decision table execution must match at least one value that is defined in one of the rules of the decision table. 

 

  • Input values used for decision table execution: Auto, Crop
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life
  • Input values used for decision table execution: Travel
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life

Does not contain any

None of the input values used for decision table execution must be available in the list of values defined in one of the rules of the decision table. 
  • Input values used for decision table execution: Travel
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life
  • Input values used for decision table execution: Auto, Crop
  • Values defined in one of the rules of the decision table: Home, Health, Auto, Life