Class EngineRulePreconditions

    • Method Detail

      • checkRulesHaveSameType

        public static <T extends AbstractRuleEngineRuleModel> void checkRulesHaveSameType​(java.util.Collection<T> engineRules)
        Verify if all the rules in the collection are of the same type. Throw IllegalStateException otherwise
        Type Parameters:
        T - type of the engine rule
        Parameters:
        engineRules - collection of engine rules
        Throws:
        java.lang.IllegalStateException - if rule type is not the same
      • checkRuleHasKieModule

        public static <T extends AbstractRuleEngineRuleModel> void checkRuleHasKieModule​(T rule)
        Verify if the engine rule is associated with any KIE module, throw IllegalStateException otherwise
        Type Parameters:
        T - type of the engine rule
        Parameters:
        rule - engine rule to check
        Throws:
        java.lang.IllegalStateException - if any given rule has no KIE module