Class DroolsRuleLoopException

All Implemented Interfaces:
Serializable

public class DroolsRuleLoopException extends RuleEngineRuntimeException
DroolsRuleLoopException indicates that a potentially infinite loop has been detected (based on the fact that a rule has been fired more than limit times.
See Also:
  • Constructor Details

    • DroolsRuleLoopException

      public DroolsRuleLoopException(long limit, Map<org.kie.api.definition.rule.Rule,Long> ruleMap)
  • Method Details

    • getLimit

      public long getLimit()
    • getAllRuleFirings

      public List<String> getAllRuleFirings()
      Returns an ordered list of strings for all rules that have fired during the rule evaluation. Each string represents how often a specific rule has fired. The result is in the format: $firedCount:$Rule.id, e.g. 100:Rule Number 14
      Returns:
      the list of all rule firings
    • getRuleFirings

      public List<String> getRuleFirings(long size)
      Returns the list of strings as described in getAllRuleFirings() but limited by size.
      Parameters:
      size - limit the list of strings returned
      Returns:
      the list of the size most often fired rules
    • getMessage

      public String getMessage()
      Returns the 10 most fired rules and its firing count.
      Overrides:
      getMessage in class Throwable