DROOLS Interview Questions and Answers :-
1. Explain what is Drool?
Drool is one of the business rule management systems or BRMS that has forward and backward chaining inference based rule engine.
2. Explain what is other nomenclature for Drool?
Drool is also known as production rule system that uses enhanced implementation of Rete algorithm.
3. Explain what is meant by Knowledge is Everything or KIE?
KIE is the new umbrella name to the systems set like drools, jBPM, optaPlanner, Guvnor, and uberFire and such other technologies.
4. Explain what is the standard supported by Drool?
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.
5. Explain what is JBoss Enterprise BRMS?
JBoss Enterprise BRMS is the reasoning engine for policy and rule developments for business. It also manages access and changes.
6. Explain what is the productized version of Drools?
JBoss Enterprise BRMS is the productized version of Drools and it has enterprise level support.
7. Explain what are the components of JBoss Enterprise Version?
The components of JBoss Enterprise Version are JBoss Enterprise web platform, JBoss Enterprise application of SOA platform, Business Rules Engine, and Business Rules Manager.
8. Explain what are the features of JBoss Enterprise Web Platform?
The JBoss Enterprise Web Platform is the software infrastructure that supports the running of BRMS components.
9. Explain what are the features of JBoss Enterprise Application or SOA Platform?
It is the application software structure in the system that supports running of BRMS components.
10. Who use the Business Rules Engine?
Drools experts use the Business Rules Engine through Rete algorithm and Drools Rule Language (DLR).
11. Explain what is Business Rules Manager?
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.
12. Explain what is meant by Drools Guvnor and Drools Expert?
Drools Guvnor is the Business Rules Manager and Drools Expert is the Business Rules Engine.
13. Explain what is Drools Flow?
Drools Flow or process or workflow as it is variedly called, provides the workflow as well as business processes.
14. Explain what is the tool for managing complex event processing in Drools?
It is the Drools Fusion that is used for event processing as well as temporal reasoning.
15. Explain what is meant by Drools Planner?
Drools Planner or automated planning optimizes the process including the NP-hard planning problems.
16. Explain what is the purpose of dialect in Drools?
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.
17. Explain what is the restriction in using Java code?
User cannot use Java code inside “when” part of the rules. However, it can be use in the “then” part.
18. Explain what is the reason for putting $ symbol before the variables?
The objective of putting $ symbol before the variables is to ensure the difference between variables of POJO classes and Rules.
19. Explain what is provided by Drools?
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.
20. Explain what are Drool Workbench, Expert, and Fusion?
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.
21. How to halt process in DRL file?
User has to resort to drools.halt() in the consequence (then) part of the application.
22. How to remove object from knowledge session?
Using retract method to remove the object from knowledge session can help.
23. How to fetch and play around with the rules in java code?
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.
24. Is it possible using round trips between rules modified in Guvnor, loade in the UI, modified and uploaded to Guvnor?
There is no such way of ensuring this. Especially newcomers should not try this to avoid complications.
25. Is it possible working with completely custom UI instead of using Guvnor Rule?
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.
26. If there are still rules that need to be managed in Guvnor Explain what steps user should take?
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.
27. Explain what is the global variable in Drools?
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.
28. How should the global variable be used in 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.
29. Explain what is the use of global variable?
Global variable can be used for any type of object and there won’t be any mismatch.
30. Where global variable should be used?
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.
31. Explain what is not advisable in use of global variables?
Changing global value inside the rule is not advisable. Instead the value should be set from the application using the working memory interface.
32. Explain what is meant by accumulate in DRL Drools?
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.
33. Explain what is meant by Drools Recursive Rules?
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.
34. Explain what are the most important parts of Recursion in Drools?
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’.
35. Explain what would be the breaking condition in Fibonacci series?
The breaking condition in Fibonacci series would be (sequence==1).