Drool is one of the business rule management systems or BRMS that has forward and backward chaining inference based rule engine.
Go through this blog to get to know about more on drools.
Drool is also known as production rule system that uses enhanced implementation of Rete algorithm.
KIE is the new umbrella name to the systems set like drools, jBPM, optaPlanner, Guvnor, and uberFire and such other technologies.
Drool supports JSR-94 standards for the business rule engine. It also supports enterprise framework for construction, enforcement, as well as maintenance of business policies.
Go through the Drool Video to get clear understanding of Drool.
JBoss Enterprise BRMS is the reasoning engine for policy and rule developments for business. It also manages access and changes.
JBoss Enterprise BRMS is the productized version of Drools and it has enterprise level support.
Master Drools, in this Drools certification training.
The components of JBoss Enterprise Version are JBoss Enterprise web platform, JBoss Enterprise application of SOA platform, Business Rules Engine, and Business Rules Manager.
The JBoss Enterprise Web Platform is the software infrastructure that supports the running of BRMS components.
It is the application software structure in the system that supports running of BRMS components.
Drools experts use the Business Rules Engine through Rete algorithm and Drools Rule Language (DLR).
Business Rules Manager is a centralized repository for the Drools knowledge bases and has rich web based Graphical User Interface as well as tools and editors to manage large numbers of rules.
Drools Guvnor is the Business Rules Manager and Drools Expert is the Business Rules Engine.
Drools Flow or process or workflow as it is variedly called, provides the workflow as well as business processes.
Learn all about Drool through this online Drool training course.
It is the Drools Fusion that is used for event processing as well as temporal reasoning.
Drools Planner or automated planning optimizes the process including the NP-hard planning problems.
Dialect or mve1 points to the Getter and Setters of the variables of plain old Java objects (POJO). Dialect “java” is used for writing Java code in the rules.
User cannot use Java code inside “when” part of the rules. However, it can be use in the “then” part.
The objective of putting $ symbol before the variables is to ensure the difference between variables of POJO classes and Rules.
Drools provides core Business Rules Engine (BRE) and Web Authoring and Rules Management Application (Drools Workbench) as well as the Eclipse IDE plugin for core developments.
Drools Workbench is the web user interface for authoring and management. Drools Expert is the business rule engine and Drools Fusion is the complex event processing feature.
User has to resort to drools.halt() in the consequence (then) part of the application.
Using retract method to remove the object from knowledge session can help.
Rules does not exist as the Java codes. However it is possible using Guvnor REST API for downloading the DRL source code for the rules and thereafter uploads them all over again.
There is no such way of ensuring this. Especially newcomers should not try this to avoid complications.
Rules can be stored in the custom domain model in a database generating the DRL from that model. This can render Guvnor redundant in the custom environment.
If the user still has rules that are required to manage in Guvnor then he or she should generate the DRL and upload it into Guvnor using REST API.
The global variable in Drools is the keyword. Global is the variable used in Drool and is visible in all rules inside the DRL file.
Global variables can be used extremely carefully in DRL file. Changes in global variable are not modified in working memory and hence care in handling them is required.
Global variable can be used for any type of object and there won’t be any mismatch.
Where in the rules requirements for database connection object is necessary, global variable should be used. For instance; The DB connection object could be global variable.
Changing global value inside the rule is not advisable. Instead the value should be set from the application using the working memory interface.
Accumulate is conditional element that was introduced in Drools version 4.0. It is used to iterate over the list of objects and help validation of data in Java operation.
A Fibonacci series is the most common example of recursion in Drools. In the Drools the implementation is carried out using the insert and modifies keywords.
The three most important parts of in the process of implementation of recursive rules in Drools are inserting keywords in ‘then’ part, not keyword used in ‘when’ part, and ‘breaking condition’.
The breaking condition in Fibonacci series would be (sequence==1).
Very good interview questions.Thank a lot for this really commendable work.:)
Your email address will not be published. Required fields are marked *