Questions tagged [jboss-rules]
14 questions
12
votes
5 answers
Drools testing with junit
What is the best practice to test drools rules with junit?
Until now we used junit with dbunit to test rules. We had sample data that was put to hsqldb. We had couple of rule packages and by the end of the project it is very hard to make a good test…

Hubidubi
- 850
- 4
- 18
- 34
10
votes
3 answers
Is drools the same as jrules?
Is there a difference between Drools and Jrules? Is Jboss rules the same thing as Jrules? What type of environments typically use Drools?

Dustin
- 101
- 1
- 1
- 3
6
votes
2 answers
How do you unit test Jboss Rules (Drools) rules?
I have written a few Drools rules for my Seam application and am wondering how I go about unit testing these. Does anybody have any sample code that can show me how to go about doing this?

Aaron Chambers
- 1,354
- 2
- 12
- 27
3
votes
1 answer
How can we share individual rules between .drl files in JBoss Rules?
We are using JBoss Rules (a.k.a. Drools) and have several .drl files that each contain several rules. Is there a way to avoid duplication between files, so that we can define common rules that are available to more than one .drl file?
Unfortunately,…

Peter Hilton
- 17,211
- 6
- 50
- 75
2
votes
3 answers
Setting globals in Drools
How do I set a global in Drools 4 from within a rule? I want to set a boolean if a rule fires so that it can read it from another rule with a lower salience.

Tarski
- 5,360
- 4
- 38
- 47
2
votes
0 answers
Memory-issue with instance of "ReteooStatefulSession"
I'm using jBoss Rules.But I run in to memory issues after using JBoss rules. Using a profiling tool I collected heap dump
and I got the result as :
One instance of "org.drools.reteoo.ReteooStatefulSession" loaded by
…

Annie
- 45
- 2
- 8
1
vote
1 answer
How to test functions present in the drool file without calling rule?
I want to do junit for my rule files. My rule file broadly has two things:
a rule
a helper function (in drools, not Java) which I am calling from then section of a rule
Now I want to test(assert) this function isolatedly based on the test case. is…

Witty wit
- 11
- 1
1
vote
3 answers
Problem writing LHS of Drools / JBoss Rules where I'm matching one fact and then using that fact to determine whether another fact exists
I'm using Drools (for the first time) to express some rules and it has been working really well so far. However I've been given a new condition that I'm not able to express in the rules language very clearly.
Essentially I need to perform an action…

BenM
- 4,056
- 3
- 24
- 26
1
vote
2 answers
drools.getRule().getName() in attributes -rule drool file
I need to enable / disable certain rules from drl file based on data from the backend .
i.e enable Rule 1,2,3 for Dubai , Enable 1,3 for Singapore
So , I pass drools.getRule().getName() as below.
rule "Apply 50% discount to VIP customers"
…

Hardik Amlani
- 11
- 1
- 2
1
vote
1 answer
can I cache a kiesession in drools expert?
I have a large set of rules and when I execute
KieSession ksession = kc.newKieSession(sessionName);
It takes a long time. I would like to reuse the kiesession. How is it possible to do that?
My input records come one at a time and not in a…

user1456599
- 481
- 5
- 11
0
votes
0 answers
Drools error after migrating from Java 8 to Java 11
I am getting following error when compiling rules after migrating from Java 8 to 11:
Error compiling rule package at org.tolven.rules.PackageCompiler (line 68)
Caused by: wrong class format at org.drools.commons.jci.compilers.EclipseJavaCompiler$2…

Valsaraj Viswanathan
- 1,473
- 5
- 28
- 51
0
votes
3 answers
Drools rules insert new fact and fired other rules dynamic
I am new to drools and the kie-server. I got problem about how to insert new facts in working memory by fired rule RHS(then action) then activate other rules by these dynamic-insered facts.
What I expect is when BaseFeature insert into Working…

Zeng xijin
- 13
- 1
- 4
0
votes
4 answers
Kie-Maven-Plugin is not working, unable to compile rule artifacts
I am doing a sample hello world maven project using drools version 6.0.0.Final.
Below is the build of my pom file, i have specified the kie-maven-plugin but i can notice that this plugin couldnt get executed. Is there anything i am missing here.…

vashishth
- 2,751
- 4
- 38
- 68
0
votes
1 answer
What is wrong with Drools rule?
I have a long time experience working with JBOSS Drools.
current project I'm working with uses Drools 4.
here is the one of the rules I have in project
rule "testcase"
salience 300
when
$item : Item(itemTypeId in (Item.ITEM_TYPE_A,…

board reader
- 344
- 3
- 11