Questions tagged [drools]

Drools is a business-rule management system (BRMS) with a forward-chaining-inference-based rules engine, more correctly known as a production rule system, using an enhanced implementation of the Rete algorithm.

https://www.drools.org/

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), full runtime support for Decision Model and Notation (DMN) models at Conformance level 3 and an Eclipse IDE plugin for core development.

4035 questions
9
votes
1 answer

Best practices for using Drools Expert/Flow in a Web Application

I'm currently teaching myself Drools Expert/Flow as well as GWT. I want to use Drools Flow as an event/command bus and business rule engine to achieve loose coupling between different parts of the application. So far I've gotten both Expert and Flow…
Magnus
  • 3,691
  • 5
  • 27
  • 35
9
votes
5 answers

Should I use Drools in this situation?

I'll use a university's library system to explain my use case. Students register in the library system and provide their profile: gender, age, department, previously completed courses, currently registered courses, books already borrowed, etc. Each…
Tong Wang
  • 1,602
  • 4
  • 29
  • 36
9
votes
3 answers

Loading Drools/KIE Workbench artifacts directly from the repository

We try to switch to Drools 6 with the all new KIE workbench (formerly known as Guvnor) and the new maven-based artifacts. Now I'd like to use the the system described in this blog post in the second image ("Deployment"): Loading the rules via HTTP…
Dominik Sandjaja
  • 6,326
  • 6
  • 52
  • 77
9
votes
4 answers

Drools functions

Recently I'm working with drools and I want to make some special checks on some objects. I need to use functions in the when section of the rule, but I'm getting an error. Example: function boolean newFunction(int a){ if(a>0) return true; …
Fulgencio Jara
  • 419
  • 1
  • 7
  • 12
9
votes
2 answers

Drools disable a rule at runtime

I'm starting a project whith Drools and Drools Guvnor. My rules are deployed in drools guvnor. My rule engine instance can access those rules via the pkg file exposed by drools Guvnor when you do a package release build and release. This is all…
Frederic Close
  • 9,389
  • 6
  • 56
  • 67
8
votes
1 answer

could drools reason over data stored in a relational database (using HIbernate for example)

i have to achieve an application with drools but, it appears that DROOLS can not reason over a big number of objects simultaneously. i want to know if it could reason over data stored in a relational database and not in the workingMemory. thanks for…
fennou
  • 95
  • 1
  • 5
8
votes
4 answers

Drools: How to use an enum in the lhs of a rule?

I am having difficulties in writing a rule which match with an enum value in its lhs. For example, if I have the following enum: public enum EStatus { OK, NOT_OK } I would like to use it in something like this: rule "my rule" dialect "java" …
Calin
  • 1,471
  • 1
  • 15
  • 22
8
votes
1 answer

Drools with DMN vs DRL

Drools now has complete runtime support for DMN (Decision Model and Notation). DMN files are now an asset that can be added to any kjar for execution. My thinking here is that Drools Rule is a non standard/proprietary where as DMN is open but newer…
Robbo_UK
  • 11,351
  • 25
  • 81
  • 117
8
votes
1 answer

How to write nested conditions in when in drools

Here is my JSON Document { "location": { "details": [ { "country": "India", "state": "haryana" }, { "country": "America", "state": "LA" }, { …
gaurav9620
  • 1,147
  • 12
  • 30
8
votes
1 answer

Unable to Analyse Expression error for large rules

We are using Drools v6.3.4 - but tested that the same issue is happening in v7.3.0 as well. When we write a rule where the rule is 27000 characters long or more, we get "Unable to Analyse Expression" error rule "StoreRule" when (s:…
8
votes
2 answers

Error installing Drools plugin for Eclipse

Does anyone know how to fix this issue ? Cannot complete the install because one or more required items could not be found. Software being installed: JBoss Runtime Drools Detector 6.3.0.Final…
user1363516
  • 360
  • 4
  • 15
8
votes
4 answers

are for loops possible in drools?

does anybody know if there is a way to do for loops in drools ?. I am trying to loop through a list of string to see if one of the strings matches a pattern e.g. def listOfStrings = ['a','a.b','a.b.c'] for(String s:listOfStrings){ if(s matches…
mh377
  • 1,656
  • 5
  • 22
  • 41
8
votes
1 answer

How to stop threads when undeploying a Java EE application?

I undeploy my Java EE app that uses an asynchronous logger that logs in its own thread from the Drools rules engine. I use it to log decisions the rules engine makes but I cannot let it have impact on the throughput, therefore it must run in its own…
Arne
  • 249
  • 4
  • 19
8
votes
3 answers

How do you pre-compile Drools rules?

I want to pre-compile my .drl files to .class files so they do not have to be compiled a run time. The documentation makes it sounds like the kie-maven-plugin does this, but it is not generating anything for me. It compiles the rules files but…
Scott Thibault
  • 329
  • 2
  • 4
  • 12
8
votes
4 answers

drools-6 (kie) auto scanning (from spring) of modules and sessions from kie workbench deployed artifacts

I am trying to build a web (spring-mvc) application with kie (drools 6) integrated via injection. I have used kie workbench to create a workflow, complied and deployed. I have added reference of this artifact in my project's pom.xml and added the…
Avnish
  • 1,241
  • 11
  • 19