Class DroolsRuleLoopException

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DroolsRuleLoopException​(long limit, java.util.Map<org.kie.api.definition.rule.Rule,​java.lang.Long> ruleMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getAllRuleFirings()
      Returns an ordered list of strings for all rules that have fired during the rule evaluation.
      long getLimit()  
      java.lang.String getMessage()
      Returns the 10 most fired rules and its firing count.
      java.util.List<java.lang.String> getRuleFirings​(long size)
      Returns the list of strings as described in getAllRuleFirings() but limited by size.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DroolsRuleLoopException

        public DroolsRuleLoopException​(long limit,
                                       java.util.Map<org.kie.api.definition.rule.Rule,​java.lang.Long> ruleMap)
    • Method Detail

      • getLimit

        public long getLimit()
      • getAllRuleFirings

        public java.util.List<java.lang.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 java.util.List<java.lang.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 java.lang.String getMessage()
        Returns the 10 most fired rules and its firing count.
        Overrides:
        getMessage in class java.lang.Throwable