- Type Parameters:
R- rule type parameter
- All Known Subinterfaces:
Knowledge,RuleSession<S>,RuleSetContext<C,,R> StatefulSession,StatelessSession
- All Known Implementing Classes:
AbstractSessionWrapper,KnowledgeWrapper
public interface RuleSet<R extends Rule>
Interface describes a mutable collection of rules. Both Knowledge and RuleSession
are extending this interface.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a rule based on its name.default RRetrieves a rule based on the name of the named object.getRules()Method returns a list of rules created so far.resolveFieldReferences(String[] args, NamedType.Resolver typeMapper) default booleanruleExists(String name) Checks if a rule with the specified name exists in the rule set.default voidDeprecated.Since version 3.1.0, for performance reasons, rules are no longer compiled one by one.
-
Method Details
-
getRules
Method returns a list of rules created so far.
- Returns:
- list of currently known rules
-
ruleExists
Checks if a rule with the specified name exists in the rule set.- Parameters:
name- the name of the rule- Returns:
trueif a rule with the specified name exists,falseotherwise
-
getRule
Retrieves a rule based on its name.- Parameters:
name- the name of the rule to retrieve- Returns:
- the rule with the specified name, or null if no rule with that name exists
-
getRule
Retrieves a rule based on the name of the named object.- Parameters:
named- the object with a name- Returns:
- the rule with the specified name, or null if no rule with that name exists
-
setRuleBuilderExceptionHandler
Deprecated.Since version 3.1.0, for performance reasons, rules are no longer compiled one by one. As such, the use of this exception handler has become obsolete. Please join our discussions on GitHub to propose a new approach.- Parameters:
handler- exception handler
-
resolveFieldReferences
-