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.

www.jboss.org/drools

The Business Logic integration Platform provides a unified and integrated platform for Rules, Workflow and Event Processing. It's been designed from the ground up so that each aspect is a first-class citizen, with no compromises.

3669 questions
9
votes
1 answer

Drools - rule hierarchy and conditional execution

I was wondering if there is a way to define hierarchy (not just order of execution) between rules and control the rule execution - i.e. if the parent rule fired then the ones below should not be evaluated etc... Information in this thread is an…
shikarishambu
  • 2,159
  • 6
  • 34
  • 54
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
1 answer

How do I add facts to working memory at runtime in the Drools DRL and retrieve them in the execution results of a stateless session?

Background: I'm working on an application that transforms an input object into one of two output objects based upon a set of drools rules. The output object is not known until runtime and it is created in the first rule to execute. Here is the rule…
gregwhitaker
  • 12,346
  • 7
  • 66
  • 73
8
votes
0 answers

How to deploy a rules kjar to S3 bucket from within the kie workbench?

I am trying to use a S3 bucket as a remote maven repository via which to distribute the rules jar, created with the kie workbench UI, to where they are needed. If i package the rules with maven from my IDE, i can successfully upload the jar to s3…
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
  • 947
  • 7
  • 28
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

Cannot find KieModule: org.default:artifact:1.0.0-SNAPSHOT

I'm using the following drools configuration file in a Spring Boot application to load/execute rules from a DataBase which runs fine locally but when I try deploying the application to a Server i got an error saying no KieModule Bean found. I added…
Orby
  • 402
  • 1
  • 7
  • 19
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
  • 320
  • 3
  • 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,271
  • 4
  • 16
  • 31
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
  • 3
  • 19
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,051
  • 10
  • 18
8
votes
2 answers

Drools get facts from database at runtime

I need a little help with Drools eval and variable assigning. rule "check that no previously submitted requests exist" when $user : UserFormField( name == 'employeeId', value != null ) $repository : Repository( ) $activeRequests :…
ATMTA
  • 747
  • 6
  • 18
8
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
  • 379
  • 1
  • 6
  • 11
7
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,401
  • 1
  • 13
  • 21
7
votes
2 answers

Configuring drools and maven and writing hello world application using them

I want to learn drools and maven can any one help me with the links for configuring drools and maven and writing a basic hello world example using them. Thanks in advance
Anupam Gupta
  • 1,581
  • 8
  • 33
  • 58