This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article contains content that is written like an advertisement. Please help improve it by removing promotional content and inappropriate external links, and by adding encyclopedic content written from a neutral point of view. (July 2020) (Learn how and when to remove this template message) This article may need to be rewritten to comply with Wikipedia's quality standards. You can help. The talk page may contain suggestions. (December 2021) (Learn how and when to remove this template message)
Drools
Developer(s)Red Hat
Stable release
8.31.1.Final / December 8, 2022; 11 months ago (2022-12-08)[1]
Repository
Written inJava
Operating systemCross-platform
TypeRules engine
LicenseASL 2
Websitewww.drools.org Edit this on Wikidata

Drools is a business rule management system (BRMS) with a forward and backward chaining inference based rules engine, more correctly known as a production rule system, using an enhanced implementation of the Rete algorithm.

Drools supports the Java Rules Engine API (Java Specification Request 94) standard for its business rule engine and enterprise framework for the construction, maintenance, and enforcement of business policies in an organization, application, or service.

Red Hat Decision Manager

Red Hat Decision Manager (formerly Red Hat JBoss BRMS[2]) is a business rule management system and reasoning engine for business policy and rules development, access, and change management.[3] JBoss Enterprise BRMS is a productized version of Drools with enterprise-level support available. JBoss Rules is also a productized version of Drools, but JBoss Enterprise BRMS is the flagship product.[4]

Components of the enterprise version:[5]

Drools and Guvnor are JBoss Community open source projects. As they are mature, they are brought into the enterprise-ready product JBoss Enterprise BRMS.

Components of the JBoss Community version:[8]

Example

This example[9] illustrates a simple rule to print out information about a holiday in July. It checks a condition on an instance of the Holiday class, and executes Java code if that condition is true.

rule "validate holiday" 
when
    $h1 : Holiday( month == "july" )
then
    System.out.println($h1.name + ":" + $h1.month);
end

The purpose of dialect "mvel" is to point the getter and setters of the variables of your Plain Old Java Object (POJO) classes. Consider the above example, in which a Holiday class is used and inside the circular brackets (parentheses) "month" is used. So with the help dialect "mvel" the getter and setters of the variable "month" can be accessed.

Dialect "java" is used to help us write our Java code in our rules. There is one restriction or characteristic on this. We cannot use Java code inside "when" part of the rule but we can use Java code in "then" part.

We can also declare a Reference variable $h1 without the $ symbol. There is no restriction on this. The main purpose of putting the $ symbol before the variable is to mark the difference between variables of POJO classes and Rules.

See also

References

  1. ^ "Drools - Releases". Retrieved 2022-12-14.
  2. ^ "JBoss Enterprise BRMS". Red Hat.
  3. ^ "JBoss Enterprise BRMS". Red Hat.
  4. ^ "JBoss Enterprise BRMS: Answers to frequently asked questions" (PDF). JBoss Community.
  5. ^ "JBoss Enterprise BRMS Platform 5.1". Red Hat. Archived from the original on 2011-03-18.
  6. ^ "JBoss Enterprise BRMS datasheet" (PDF). Red Hat. p. 4.
  7. ^ "Drools - Business Rules Management System (Java™, Open Source)".
  8. ^ "Drools 5 - The Business Logic integration Platform". JBoss Community.
  9. ^ http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html#d0e2676[permanent dead link]