Rule Sets

Rule sets are used to check if a message should bypass rating. Rule Set Configuration Properties describes the properties available for configuring rule sets:

Table 1. Rule Set Configuration Properties
Property Description
responseGenerator.handlers.handlerName.ruleSets[n].pathRegex (Optional) When set, matching paths are selected.
responseGenerator.handlers.handlerName.ruleSets[n].headerRegex (Optional) When set, matching headers are selected.
responseGenerator.handlers.handlerName.ruleSets[n].rules The rule sets that are used to evaluate messages. All rules must match for a message to pass a given rule set.

A rule set is evaluated in the following order:

  1. If the pathRegex property is set, check if the path matches, otherwise continue.
  2. If the headerRegex property is set, check if the header matches, otherwise continue.
  3. Check if any rules match.

Each rule in a rule set defines the jsonPath to check, the operation to perform and the value(s) to compare. Rule Configuration Properties describes the properties available for configuring rules:

Table 2. Rule Configuration Properties
Property Description
responseGenerator.handlers.handlerName.ruleSets[x].rules[y].jsonPath The path to the variable to check.
responseGenerator.handlers.handlerName.ruleSets[x].rules[y].operation The operation used to compare the field value with the configured value(s).
responseGenerator.handlers.handlerName.ruleSets[x].rules[y].value The value to compare with the field value for this rule. This value is mutually exclusive with the values property.
responseGenerator.handlers.handlerName.ruleSets[x].rules[y].values The values to compare the with the field value for this rule. This value is mutually exclusive with the value property.

Rule Operators describes the operators available:

Table 3. Rule Operators
Operator Description
EQUALS Checks to see if the value is equal to the configured value.
NOT_EQUALS Checks to see if the value is not equal to the configured value.
LESS_THAN Check to see if the value is less than the configured value. The operation returns false if the field value is not a numeric value.
GREATER_THAN Check to see if the value is greater than the configured value. The operation returns false if the field value is not a numeric value.
IN Checks to see if the value is equal to one of the configured values.
NOT_IN Checks to see if the value is not equal to any of the configured values.
REGEX Checks to see if the value matches the configured regular expression value.
NOT_REGEX Checks to see if the value does not match the configured regular expression value.
NOT_SET Checks to see if the value is null.