Drools
| Company type | Open source software |
|---|---|
| Industry | Software |
| Products | Business rule management system, rules engine |
| Owner | JBoss Community (part of Red Hat) |
| Parent | Red Hat (for commercial version) |
| Website | www |
Drools is a business rule management system (BRMS) that incorporates a rules engine based on both forward and backward chaining inference methods. This production rule system is constructed upon an advanced implementation of the Rete algorithm.
It complies with the Java Rules Engine API (JSR 94) specification, offering a comprehensive enterprise framework designed to develop, manage, and enforce business policies across various organizations, applications, or services.
Drools within Apache Kie
Drools joined the Apache Incubator in January 2023 as a component of the Kie Community.[1]
Red Hat Decision Manager
Red Hat Decision Manager—previously known as Red Hat JBoss BRMS—is a commercial BRMS and reasoning engine tailored for developing, accessing, and managing business rules and policies. It represents a productized edition of Drools that includes enterprise-grade support.[2]
Key enterprise components consist of:[3]
- JBoss Enterprise Web Platform – foundational infrastructure supporting BRMS modules
- JBoss Enterprise Application Platform or JBoss Enterprise SOA Platform – supported execution environments for BRMS
- Business Rules Engine – Drools Expert utilizing the Rete algorithm alongside Drools Rule Language (DRL)
- Business Rules Manager – Drools Guvnor, a centralized repository equipped with sophisticated web tools for managing extensive rule collections
- Business Rules Repository – Drools Guvnor
Both Drools and Guvnor are well-established open source projects within the JBoss Community and have been integrated into the enterprise-ready JBoss Enterprise BRMS.
The community edition includes:[4]
- Drools Guvnor (Business Rules Manager) – centralized knowledge base repository
- Drools Expert (rule engine) – executes defined business rules
- Drools Flow (workflow/process) or jBPM 5 – facilitates business process management
- Drools Fusion (event processing) – supports complex event processing capabilities
- Drools Planner/OptaPlanner – provides automated planning optimization, including solutions for NP-hard problems
Example
The following example demonstrates a straightforward rule that outputs details about a holiday occurring in July. It evaluates a condition on an instance of the Holiday class and runs Java code when the condition holds true.
<syntaxhighlight lang="raku"> rule "validate holiday" when
$h1 : Holiday( month == "july" )
then
System.out.println($h1.name + ":" + $h1.month);
end </syntaxhighlight>
The "mvel" dialect grants access to getter and setter methods within your Plain Old Java Object (POJO) classes, such as accessing the "month" property in the Holiday example.
Conversely, the "java" dialect permits embedding Java code exclusively in the "then" part of rules; use of Java code in the "when" clause is not allowed.
While variables like $h1 can be declared without the $ prefix, including it helps clearly differentiate POJO variables from those used within rules.
See also
External links
- ↑ Lua error in Module:Citation/CS1/Configuration at line 2123: attempt to index field '?' (a nil value).
- ↑ Lua error in Module:Citation/CS1/Configuration at line 2123: attempt to index field '?' (a nil value).
- ↑ Lua error in Module:Citation/CS1/Configuration at line 2123: attempt to index field '?' (a nil value).
- ↑ Lua error in Module:Citation/CS1/Configuration at line 2123: attempt to index field '?' (a nil value).