Is there a way of assigning the rules defined by a decision table to a
ruleflow-group? I'd like to fire the rules defined in a decision table at a
particular point in a ruleflow, but I'm struggling to see how to do it.
some people complained that the Golfer-example from the JBoss-Drools
distribution finds two identical solutions.
I investigated a little and found the "problem":
The rule is underspecified: It binds five Golfer objects, but only
four of those are completely specified by their respective
condition elements. The fifth, the "Freds right neighbour", lacks
What happens is the following: The "unknown golfer" can be bound to
two different facts: I had the "unknown" golfer
printed out - and see what happened:
Fred 1 orange, Joe 2 blue, Bob 4 plaid, Tom 3 red
unknown Tom 2 blue
Fred 1 orange, Joe 2 blue, Bob 4 plaid, Tom 3 red
unknown Joe 2 blue
As the unknown golfer is NOT compared to the actual neighbor, Joe,
there are two possible instantiations
for our "unknown" golfer...
The solution would be to constraint the unknown-golfer (= Fred's
right neighbour) to the set of (Bob, Joe, Tom)...
an eval sounds great - too bad the "in" constraint doesn't work...
// freds right neighbour is either Tom, Bob or Joe!
eval (($fn == $joe) || ($fn == $bob) || ($fn == $tom))
The simple (but un-elegant) solution is setting an agenda-group rule-
attribute, prohibing the rule from firing twice.
In his book on JESS, E. Friedemann-Hill shows JESS to deliver only a
single solution ... I translated the Drools-version
literally to his JESS version (I had to create GolferColor and
GolferPosition classes, but needed only 32 facts in working memory,
instead of 64 with the combined Golfer-drools version)....
Dr. Gernot Starke
Doing IT Right
Willi-Lauf Allee 43, D-50858 Köln
+49 (0) 177 - 728 2570
Das freie Portal für Software-Architekten:
Does drools work with JDK 1.4 ?
The following is what i have in my xml rules file
<rule-set name="Tests assignment rules" xmlns="http://drools.org/rules"
<rule name="rule1" salience="100">
System.out.println("Received message "+testMessage);
Have included the following jar files in the classpath.
Have placed the rules in an xml file. The xml file is placed in the
folder/package "rules/test". When the application tries to call the
"loadFromReader" method, after getting the InputStreamReader, i get the
[8/10/07 13:16:24:173 GMT] 00000045 SystemErr R
package name for rule package.
Would appreciate if someone could guide me on this.
When I used a dsl file with an empty rule I have this :
MCO/Rule_regle_DSL_0.java (8:265) : Syntax error, insert
"AssignmentOperator Expression" to complete Expression
MCO/Rule_regle_DSL_0.java (8:265) : Syntax error, insert ";" to complete
MCO/Rule_regle_DSL_0.java (8:265) : then cannot be resolved
Maybe because the dialect of the package is java, what it means ? is it the
View this message in context: http://www.nabble.com/error-using-a-dsl-tf4248883.html#a12091876
Sent from the drools - user mailing list archive at Nabble.com.
I am trying to improve performance on a Large DataSet, few Rules app
and came accross these two properties, which by default is false:
What do they mean actually? How and when should I use them?
I am trying to chase a O(n^2) performance problem that I understand it
is probably caused by the way I coded the rules, but it seems that I
need to deepen my understanding to actually find the hotspots. Are
there any techniques (that I probably dont know) that can help me find
what rule(s) is causing the issue?
As always thanks for previous answers
I am pretty new here and wonder if someone could help me answer some
questions. I wrote bunch of .drl file for my validation, but one of the
validation uses some rules from each .drl file. How could I do that?
As a drools newbie, I'm grappling with the above question; any help much
appreciated. To elaborate:
- We have a largish dataset (~50GB+) stored in an rdbms (oracle).
- we're considering using drools to implement business rules (e.g. for
data validation constraints and derivations).
- the issue is how to give the rulebase efficient & scalable access to
the db. It would potentially need to access the whole dataset, since
business rules can potentially affect all tables.
We've done an artificial pilot with a much smaller dataset, simply by
syncing the entire db into the rulebase. Users like it because they can
read the rules directly (using a DSL). Before we go any further however
we need to find a scaling strategy before we go any further.
We were thinking about some kind of caching strategy: conceptually the
rulebase would have a cache hit failure causing data to be loaded from
the db. However we've no idea if that's a practical option, or if
there's something better.
Hope that makes sense; any help much appreciated. Oh, and btw, thanks
for a great piece of software!
A quick note on language orthogonality.
We've put a great effort on improving language orthogonality in 4.0, but
we still have a few corners to round... plz feel free to bring such issues
to our attention.
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com