Drools Interview Questions

Ratings:
(4)
Views: 856
Banner-Img
Share this blog:

Drools Interview Questions

What is Drools?

Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules Engine (BRE), a web authoring and rules management application (Drools Workbench) and an Eclipse IDE plugin for core development.

What is other nomenclature for Drool?

Drool is also known as production rule system that uses enhanced implementation of Rete algorithm.

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.

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.

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.

What is BPM?

BPM stands for Business Process Management. There are 2 different aspects of BPM: BPM as management discipline and BPM as software engineering. The BPM vendors have long time tried to make abstraction of those 2 distinct aspects. That path lead to more confusion then anything else.

BPM as a management discipline is the responsibility of every strategic executive manager. It’s to ensure that the organization performs well in their core business processes. This involves understanding what values the organization delivers and how those are achieved. This means analyzing, documenting and improving the way that people and systems work together. As part of that work, it’s useful to work with models and diagrams.

BPMN diagrams express the execution flow of the steps to accomplish a certain goal. Important to note that these models are used for people to people communication. They can be underspecified, which means that they can contain valuable high level information without including unnecessary details. Such underspecified process models are also known as abstract business processes.

What is the productized version of Drools?

JBoss Enterprise BRMS is the productized version of Drools and it has enterprise level support.

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.

What is JBPM?

JBPM is a flexible Business Process Management (BPM) Suite. It makes the bridge between business analysts and developers. Traditional BPM engines have a focus that is limited to non-technical people only. jBPM has a dual focus: it offers process management features in a way that both business users and developers like it.

What does jBPM do?

This business process allows you to model your business goals by describing the steps that need to be executed to achieve that goal and the order, using a flow chart. This greatly improves the visibility and agility of your business logic, results in higher-level and domain-specific representations that can be understood by business users and is easier to monitor.

The core of jBPM is a light-weight, extensible workflow engine written in pure Java that allows you to execute business processes using the latest BPMN 2.0 specification. It can run in any Java environment, embedded in your application or as a service.

Desired to gain proficiency on Drools? Explore the blog post on Drools training to become a pro in Drools.

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.

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.

Who use the Business Rules Engine?

Drools experts use the Business Rules Engine through Rete algorithm and Drools Rule Language (DLR).

Is the Graphical Process Designer (GPD) only useable in Eclipse? Is there a way to use it standalone?

The jBPM GPD is an eclipse plugin that targets usage by multiple roles. Both the business analyst and developer are able to use the same tool in different ways. The main reason why we think it is important to integrate those two in one single environment is because in many teams, these two roles are done by one person. Then it becomes very important that the tool can support both roles and gradually shift from being a diagramming tool to an implementation tool.

What are the advantages of Rule engine?

Advantages of Rule Engines:

Greater flexibility: keeping your rules into a Knowledge base let you adapt easily your decisions when they are changing.

Easier to grasp: Rules are easier to understand than procedural code so they can be effectively used to bridge the gap between business analyst and developers.

Reduced complexity: When embedding lots of decision points to your procedural codes it can easily turn your application into a nightmare. On the other hand rules can handle much better increasing complexity because they use a consistent representation of business rules.

Reusability: By keeping rules are kept in one place leads to a greater reusability of your business rules. Also, traditional procedural code often impose unnecessary variations of base rules which are therefore more difficult to reuse in other contexts.

Where to use global variable?

Consider a scenario, where in the rules there is a requirement for database connection object. In this case, the DB Connection object can be inserted as a global variable in the working memory and the connection object will be visible to all the rules in that DRL file.

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.

What is global in DRL file?

Global is the keyword used in drools to define a global variable. Global variable is the one which will be visible to all the rules inside a DRL file.

Globals must be used very carefully in a DRL file, since the changes in a global variable are not notified to the working memory. For example, you are using a list variable as a global and in any rule you are adding a value in a list and in one particular rule, you are checking if list size() > 0, then in this case rule may not fire. Global variable can be used for any type of object.

Explain the difference between StringBuilder and StringBuffer class?

StringBuilder is unsynchronized whereas StringBuffer is synchronized. So when the application needs to be run only in a single thread then it is better to use StringBuilder. StringBuilder is more efficient than StringBuffer.

What is meant by Drools Guvnor and Drools Expert?

Drools Guvnor is the Business Rules Manager and Drools Expert is the Business Rules Engine.

What is Drools Flow?

Drools Flow or process or workflow as it is variedly called, provides the workflow as well as business processes.

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.

What is meant by Drools Planner?

Drools Planner or automated planning optimizes the process including the NP-hard planning problems.

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.

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.

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.

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.

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.

How to halt process in DRL file?

User has to resort to drools.halt() in the consequence (then) part of the application.

How to remove object from knowledge session?

Using retract method to remove the object from knowledge session can help.

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.

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.

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.

If there are still rules that need to be managed in Guvnor 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.

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.

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.

What is the use of global variable?

Global variable can be used for any type of object and there won’t be any mismatch.

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.

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.

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.

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.

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’.

What would be the breaking condition in Fibonacci series?

The breaking condition in Fibonacci series would be (sequence==1).

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.

For an Indepth knowledge on Drools click on below:

You liked the article?

Like: 0

Vote for difficulty

Current difficulty (Avg): Medium

EasyMediumHardDifficultExpert
IMPROVE ARTICLEReport Issue

About Author

Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.

Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox