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
17
votes
2 answers

understanding agenda-group in drools

I tried a sample example to see how agenda-group works. Initially I set the focus of ksession to agenda-group "ag1" and fired the rules. package com.sample import com.sample.DroolsTest.Message; rule "Hello World" agenda-group "ag1" when …
Manish Mulani
  • 7,125
  • 9
  • 43
  • 45
16
votes
2 answers

Drools Rule depending on Knowledge from JDK Map (not within non-JDK Class)

I'm trying to write the below Rule, which depends on Knowledge provided in the below main that uses just a JDK [library] Map (instead of a Map within a non-library Class). But it doesn't seem to be working... Main method: Map mapa =…
user1182373
  • 163
  • 1
  • 1
  • 5
16
votes
1 answer

Exception Catching in the LHS of Drools

I have a problem where the when clause of a drools rule throws a MethodNotFoundException. I'm looking for a way to figure out which rule it is during runtime to be able to remove it from the list of rules to use. Rule Example Rule "FooBar" when …
Mason T.
  • 1,567
  • 1
  • 14
  • 33
16
votes
3 answers

Using a workflow engine, state machine engine or rolling my own?

I'm confused. I'm developing a grails based internal tool for my company. One component in this tool is a simple issue tracker (a Helpdesk feature). I have domain objects such as Problem, Question and NewFeature. Each of these domain classes have…
Henrik
  • 3,757
  • 1
  • 19
  • 18
15
votes
5 answers

Drools: storing rules in database

Currently I store all rules files on the file system (there are lots of versions of them) and load the different versions of them into memory at startup. I would like to change to storing my drools files in a database and was wondering if there is…
ghosttrain
  • 151
  • 1
  • 1
  • 4
15
votes
3 answers

What is the new accepted way of programmatically creating new drools rules in Drools 6?

In short I want to create, edit and delete rules from a rules repository at runtime. I'm having trouble figuring out how to do this in drools 6+. I know in a previous version of drools (<= 5.6), that there was an XML representation of a .drl file…
Peter Smith
  • 849
  • 2
  • 11
  • 28
15
votes
2 answers

How and is it worth to integrate Java Webapp + drools + Guvnor?

I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize (physically and logically) the business rules from the application. Since these business rules would be very often by the business, I would want…
Sudhakar
  • 4,823
  • 2
  • 35
  • 42
15
votes
2 answers

Get Rule name in "then" clause in drools

Is it possible to retrieve rule name in the then clause of drool rule? rule "A" when --- then // something that outputs "A" Thanks.
Manish Mulani
  • 7,125
  • 9
  • 43
  • 45
14
votes
8 answers

Drools 7.4.1 kieservices.factory.get() returns null

I try to integrate Drools 7.4.1 into a webapp in tomcat. When I call in the code the following statement to get a KieService I get null. KieServices ks = KieServices.Factory.get(); When the same method is being called from a test method it is ok.…
14
votes
1 answer

Drools KnowledgeBase Deprecated

I am integrating the Drools Rules engine into my application. 99% of the examples I have found to get started look like: KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newUrlResource( url ), …
Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102
13
votes
4 answers

drools rule flow

I'm having a strange issue with drools : I have the following rules : rule "is my dog a baby?" ruleflow-group "dog" salience 10 when dog : Dog(age <1 ) then dog.setIsBaby(true); end rule "baby dog" ruleflow-group "dog" …
Ricky Bobby
  • 7,490
  • 7
  • 46
  • 63
13
votes
3 answers

Drools support in IntelliJ IDEA

I'm trying to use IntelliJ IDEA with legacy project with Drools files but I'm not successful in this. I added Drools framework to the module with *.drl files and... nothing. I can't reformat *.drl files, don't have any navigation, no code completion…
Andriy Kryvtsun
  • 3,220
  • 3
  • 27
  • 41
13
votes
2 answers

Expert/Rule Engine that updates facts atomically?

Atomically might not be the right word. When modelling cellular automata or neural networks, usually you have two copies of the system state. One is the current state, and one is the state of the next step that you are updating. This ensures…
AaronLS
  • 37,329
  • 20
  • 143
  • 202
13
votes
3 answers

Data Driven Rules Engine - Drools

I have been evaluating Drools as a Rules Engine for use in our Business Web Application. My use case is a Order Management Application. And the rules are of following kind: - If User Type is "SPECIAL" give an extra 5% discount. - If User has made…
Jasper
  • 8,440
  • 31
  • 92
  • 133
13
votes
8 answers

Drools:stateless vs stateful knowledge session

What is difference between stateless and stateful knowledge sessions.I read some documents both are maintained state.But when can i use stateless/stateful knowledge sessions.
tech2504
  • 947
  • 4
  • 19
  • 34