Home Interview Questions and AnswersTechnical Interview Questions and AnswersDrools Drool Interview Questions and Answers For Graduates Part-3

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

You may also like

Leave a Comment