Can you assign decision table rules to a ruleflow?
by Shahad Ahmed
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.
Thanks
Shahad
17 years, 3 months
Golfer example finds two identical solutions - the explanation
by Dr. Gernot Starke
Hi there,
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
that completeness...
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)....
regards,
Gernot
Dr. Gernot Starke
Doing IT Right
---
Willi-Lauf Allee 43, D-50858 Köln
gs(a)gernotstarke.de,
+49 (0) 177 - 728 2570
http://www.gernotstarke.de
Blog: http://it-and-more.blogspot.com
****************************************
Das freie Portal für Software-Architekten:
http://www.arc42.de
17 years, 3 months
Drools - exception - regarding
by PN Subramanian
Hi,
Does drools work with JDK 1.4 ?
The following is what i have in my xml rules file
<?xml version="1.0"?>
<rule-set name="Tests assignment rules" xmlns="http://drools.org/rules"
xmlns:java="http://drools.org/semantics/java"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<java:import>java.lang.String</java:import>
<java:import>java.util.List</java:import>
<rule name="rule1" salience="100">
<parameter identifier="message">
<java:class>
String
</java:class>
</parameter>
<java:condition>message.equals("testMessage")</java:condition>
<java:consequence>
System.out.println("Received message "+testMessage);
</java:consequence>
</rule>
</rule-set>
Have included the following jar files in the classpath.
1) drools-compiler-4.0.0.jar
2) drools-core-4.0.0.jar
3) antlr-runtime-3.0.jar
4) core-3.2.3.v_686_R32x.jar
5) mvel14-1.2rc1.jar
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
following exception
[8/10/07 13:16:24:173 GMT] 00000045 SystemErr R
org.drools.compiler.PackageBuilder$MissingPackageNameException: Missing
package name for rule package.
Would appreciate if someone could guide me on this.
--
P.N.Subramanian
17 years, 3 months
error using a dsl
by hypnosat7
hi,
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
BlockStatements
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
default dialect
--
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.
17 years, 3 months
Performance Tuning
by Yuri de Wit
I am trying to improve performance on a Large DataSet, few Rules app
and came accross these two properties, which by default is false:
RuleBaseConfiguration.PROPERTY_INDEX_LEFT_BETA_MEMORY
RuleBaseConfiguration.PROPERTY_HASH_ALPHA_NODES
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
- Yuri
17 years, 3 months
How to use different rules in separate drl files
by Tim.Nguyen@expeditors.com
Hi,
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?
Thanks
Best Regards,
Tim Nguyen
17 years, 3 months
architectural question: accessing large dataset from rdbms?
by Scott Finnie
Hi,
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!
- Scoot.
17 years, 3 months
Orthogonal Language Design: How Not to Do It
by Edson Tirelli
A quick note on language orthogonality.
http://www.brcommunity.com/b359.php
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.
[]s
Edson
--
Edson Tirelli
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
17 years, 3 months