Top JBoss Drools Interview Questions (2021) | CodeUsingJava
















Most frequently asked JBoss Drools Interview Questions


  1. What is JBoss Drools?
  2. What is Runtime in Drools?
  3. What are the terms used by Drools?
  4. What are the components of the JBoss enterprise?
  5. What are the advantages of using Drools?
  6. What is KIE?
  7. What are the condition in rules?
  8. How can we define rules at runtime?
  9. What do you mean by pattern matching?
  10. What is Knowledge Session?
  11. Name the types of interfaces in the Knowledge Session?


What is JBoss Drools?

JBoss Drools is a BRMS(Business Rules Management System) solution, which provides core Business Rules Engine.Using drools, users define rules that specify action needs to be done when a particular condition is met.It needs to be done in a particular condition, as it is constructed on the extension provided by the Rete pattern matching algorithm.
Drools are divided into 2 parts:
Authoring - Involves creation of Rule files.
Runtime - Involves creation of working memory and handling activation.


What is Runtime in Drools?

Drools Runtime is used in instructing the editor for running the program with specific version of Drools jar, we can also run our application with different Drools Runtime.

What are the terms used by Drools?

Terms used by drools are:
  • Rules - Here we can specify conditions.
  • Facts - Here the rules acts.
  • Session - It holds all the rules and other sources.
  • Agenda - Here all the activation are waiting to be fired.
  • Activations - It is placed in agenda where all the rules are fired.

What are the components of the JBoss enterprise?

Components of JBoss enterprise are:
  • JBoss enterprise web - Helps in supporting and running various business rule management system component.
  • JBoss enterprise application - It also helps in supporting and running business rule management system component.
  • Business Rules Engine - Helps in centralizing repository contains all basic Drools knowledge that can be used in running, editing and managing multitudes of business rules.

What are the advantages of using Drools?

Declarative Programming - Declarative in nature, helps in solving the problem statement and giving validation is very easy with drools.
Logic and Data Separation - Helps in clearing separation of Domain Objects and Business logic.
Speed and Scalability - This helps in making our application better mangeable and scalable.
Centralization of Knowledge - Helps in creating repository of knowledge in our project, that we can alternatively cite as 'A Knowledge Base'.
Explanation Facility - Provides us with system of rules that can provide us an explanation facility.


What is KIE?

Knowledge is Everything(KIE) has the latestmversions of Drools that has created different knowledge bases and session.It is new umbrella names to the systems sets like drools, jBPM, optaPlanner, Guvnor, uberFire, etc.
It helps us to reuse the rules whenever it is required, and mainly carried out as the new set of rules on repitition can be expensive and time consuming.


What are the condition in rules?

Rule can contain many conditions and patterns such as -
Account (balance == 200)
Customer (name == "Amol")


How can we define rules at runtime?

It is possible to define rules dynamically completely at runtime.

at time = t_1 the ruleset is { D1, D2, D3 }
at time = t_2 the ruleset is { D1, D3, D4 }



What do you mean by pattern matching?

The complete pattren maching is fone by the interance engine, as it helps in matching new/existing facts which can be done against production rules.
There are many algorithm used to perform pattern matching:
Linear
Treat
Rete
Leaps


What is Knowledge Session?

Knowledge Session is retrieved from knowledge base, its made for interfacing with the Drools Engine.

Name the types of interfaces in the Knowledge Session?

There are two types of knowledge session:
  • Stateless Knowledge Session - Automatically release the session when its disposed.
  • Stateful Knowledge Session - Avoids memory loss and can manually release the session.