I am working on a system where I need to correlate few error conditions
happening in the network infrastructure. I have gone through the
documentation for Jboss rules engine (Drools) and I am planning to use
it for the correlation purpose.
Can anyone let me know a way in which I can get an object from
workingmemory in the "then" part of the rule? For e.g., I need the
rule "new error"
$error : Error (state == NEW_ERROR)
(search workingmemory if this error was already
I've just started working on a project that will make use of Decision Tables
and Drools. I have read the documentation on the JBoss site and reviewed the
webinar. So the next step obviously is to join a forum and this looks like a
great place to start.
My question is in regards to actually loading in the table file. Looking at
the example I saw something similiar to the following:
I seem to keep seeing the tables being loaded into the working memory by a
Class Loader. Is this my only option? Also, that being said, is the
recommended approach for deployment to deploy the Decision tables in a jar
file and import that jar file into say a web service project in order to
reference it? Or should it be distributed across the multiple project (like
the server's) classpath?
Besides what the webinar and tutorials have demonstrated, I'm still a bit
confused as to how everything fits together...
Any help would be much appreciated!!
View this message in context: http://www.nabble.com/Decision-Tables-and-Application-Deployment-tf327690...
Sent from the drools - user mailing list archive at Nabble.com.
I am trying to write a protoype with JBoss Rules 3.0.5
I am having problem in getting the following working properly :
rule "CompDept Product Qualification Rule"
$cust:( Customer( productIDs contains "Computer")
or Customer(productIDs contains "monitor"))
# Customer(compDeptState == Customer.NOTRUN) <-------- Commented line
System.out.println("getStatus after...." + $cust.getCompDeptState () );
System.out.println("CompDeptProduct qualified...." );
where productIDs are defined as Vector in Customer class.
If I run the above rule it goes in recursive mode (I have another rule in the drl that also acts on the same customer object and modifies it).
If I uncomment the commented line my LHS it's not evaluating to true and RHS is not running.
Any help would be appreciated.
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
I would like to be able to access the data base during the execution of a rule.
The reason it's because instead of asserting in the working memory information as a global, it would be easy to make a SQL query using hibernate to consult the information.
Can I implement this in a function of my global fact or there is another way?
Thanks in advance for your attention!
Francisco Brum - francisco.brum(a)link.pt <mailto:email@example.com>
Link Consulting - http://www.link.pt/ <http://www.link.pt/>
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
I have a fact which holds a reference to another fact. I wonder which one do
I have to modify in my RHS.
My Objects are Room and Thermometer. Room holds reference to Thermometer
(and that has a property describing the value).
When my rule fires I want to decrease the temperature level to simulate that
the room gets colder until a certain value A is reached. So the rule should
be called several times until the actual level equals A.
This works ONE time when I set the new value on Thermometer and modify
Thermometer, not reaching A (the rule isnt fired again).
But works as expected when I modify Room instead of Thermometer (rules is
fired several times).
I'm new to drools and wonder if that is desired or if I do something wrong.
To make things more confusing: When several rules met the same conditions,
does only one rule gets fired or do all get fired (as I read it from Figure
1.19 of the documention).
If I modify Room my other rules _dont_ get fired. When I had modified
Thermometer my other rules _do_ get fired.
Is there anyone who can shed a little light on that for me?
View this message in context: http://www.nabble.com/modify-object-Tree--tf3268137.html#a9085281
Sent from the drools - user mailing list archive at Nabble.com.
I am using the rules engine within a Jini service. It seems to work
except for logging. Jini only supports java.util.logger from Sun. Rules
runs fine most of the time, I just am not able to see any of the log
messages. I am now having an issue I cannot diagnose without seeing the
Rules log messages.
Is there some adaptor to connect up the way Rules does logging with
I'm trying to translate an other rule-language in JBossRules (with
One of my major problems is the autoboxing- without unboxing-support in
I think it is a general problem, because (1) everyone who is writing a
rule has to know what types the properties in the objects (beans)
to be used are. I think it is enough to know is it a digit, a boolean
or... The trouble begins in an evaluation:
Person ($age1 : age, name == 'Mike')
Person ($age2 : age, name == 'Peter')
eval ($age1 > $age2) // !!! it's wrong
eval ($age1.intValue() > $age2.intValue()) // it's ok if the Objects
// are Integer and not
// Double or ...
I think a rule-creator without java-knowlege has only little
understanding for this. (... and rules are for specialist from different
(2) another conflict is in the different handling in fieldconstraints and
I can use all operators for simple types in field constraints but not in
Person (age > 20) // here I use the field as a primintiv type
Person (age < 30)
I know that all of them based on java and oop and I need this knowledge
for the RHS, but this confusion is not helpful for beginners or user
from other domains.
I don't know, what the reason for autoboxing (without unboxing
especially in java 5) is.
I'm confused by the documentation.
(Drools Documentation: "... If you use Java 5, then you get the best of
both worlds ..." (context autoboxing).
Another line in the drool documentation: "All bound primitive
declarations are boxed, there is currently no auto-unboxing (if you use
java 5, this is all automatic).")
Will the unboxing be supported in futur versions?
(... or afford a possibility for switch off the autoboxing?)
Barry, on reading your email I downloaded the current binaries and
followed the installation instructions for the Eclipse plugin. I simply
copied org.drools.ide_184.108.40.206.jar to
<eclipse-install>\sdk-3.2.1\eclipse\plugins and I could put breakpoints
in the RHS of my rules. I started a new debug configuration in Eclipse
by clicking on the "Debug..." on the dropdown list beside the "bug" icon
and choosing a new "Drools Application".
Sorry all appears OK to me :-(
[mailto:firstname.lastname@example.org] On Behalf Of Barry Kaplan
Sent: 22 February 2007 14:25
To: Rules Users List
Subject: Re: [rules-users] debugging with 3.1M1 IDE?
Well, I just checked out head and rebuilt the IDE with both the feature
and plugin. But I get no drools launch type....
(BTW, The ant/maven build seem to run clean. But importing the drools
projects into eclipse results in lots of projects with errors. Is this
expected for M1.)
rules-users mailing list