Drools - Search and Reporting
by dme1
Hi,
Is there any way to search and/or generate reports from the Rule Repository
based on different criteria like Facts, Field Values, Attributes, MetaData
etc.
E.g. If I have a rule
rule "Test"
when
@SomeMetaData("value1")
ruleflow-group "abcd"
p : Person (age > 25, country = "XYZ")
then
p.setSomeField("value");
I would like to search for all rules in the ruleflow-group abcd, and
MetaData=SomeMetaData;
or for rules which are defined for Person with age as a criteria; or for
Person with age > 25 etc.
I would like to do this in Guvnor and Eclipse if possible.
If the features do not exist what would be the best way to write a custom
search feature to satisfy this requirement.
Thanks,
dme.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Search-and-Reporting-tp4019747.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
Package footprint
by JP Chemali
Hi all,
I'm trying to reduce the memory footprint of packages in my application (for
performance reasons they are dynamically loaded from disk), and I was
wondering if some of you had any experience with the subject?
So far the optimizations that I can come up with in 5.4.0.Final version are
all about reducing the sizes of generated classes:
- Package name in the drl file should be as small as possible, one letter is
best (even better that no package at all)
- Rule name should be as small as possible as it is used to generate the
consequence class name
- Write as less code as possible in the consequence
- Use as few as possible eval statements
- By using my own JavaDialectConfiguration and MVELDialectConfiguration when
building the knowledge, I can remove the random number on class names that
was added in the recent versions (don't understand why it was added in the
first place? Does anyone know?)
I see some leeway to shorten the names of the following generated classes
but the amount of overriding to change the "default" consequence name and
the suffixes is a bit too exotic for me:
- <PackageName>.<RuleName>DefaultConsequenceInvoker
- <PackageName>.<RuleName>DefaultConsequenceInvokerGenerated
Any advice, other leads some of you might have?
Thanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/Package-footprint-tp4019721.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
ETA on Drools Planner 5.5 beta?
by Michiel Vermandel
Hi,
I have a pending issue that should be solved in Drools Planner 5.5 Beta.
(WARN : [2012-09-07 14:56:40,252] Cancelled step index (0), time spend (18375): there is no doable move. Terminating phase early.)
I was informed that Drools Planner 5.5 Beta would be released one of these days.
Any concrete delivery date available?
I have a demo to give next week and would like to test my project on 5.5 to see all is the same or better.
Thanks a lot,
Michiel Vermandel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
13 years, 10 months
How does 'from' cache works?
by Esteban Aliverti
Assuming I have the following rule:
global SomeClient client;
rule "Poll Values"
timer (int: 0s 1s)
when
$data: Data() from client.getData();
then
insert($data);
end
and that I'm just creating a session with just that rule, setting the
global and calling fireAllRules(). And let's say that my session is running
for 5 seconds.
My questions are:
1.- How many times is the rule going to be executed?
2.- How many times is client.getData() going to be invoked?
The test I have shows that the rule is executed 5 times,
but client.getData() is only invoked for the first activation. The returned
object is used in the subsequent activations. Is this the expected behavior?
As the rule name states, I'm expecting to get some (different) values from
client every second.
I understand that I'm doing 'strange' things since the rule doesn't use any
real fact but I would like to understand why I'm experiencing the described
behavior.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com
13 years, 10 months
Drools Memory Log getting over written
by himansu.nayak
Hi,
i am trying to append my memory log generated by drools rule engine. but
each time
i run the code the log just get overwritten. is there any way to avoid
overwritten of my log.
this is the code i am using for my log generation.
type 1
---------
WorkingMemory workingMemory = ruleBase.newStatefulSession();
WorkingMemoryFileLogger wmLogger = new WorkingMemoryFileLogger(
workingMemory);
wmLogger.setFileName("log/xyz");
.
.
.
wmLogger.writeToDisk();
type 2
---------
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory
.newFileLogger(ksession,
log/xyz.log);
ksession.addEventListener(CustomAgendaEventListener.getInstance());
ksession.addEventListener(CustomWorkingMemoryEventListener
.getInstance());
.
.
.
.
logger.close();
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Memory-Log-getting-over-written-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
Rule Static Analysis/Verification
by dme1
Hi,
Are there any tools/options to perform static analysis in Drools Guvnor.
What I am looking for explicitly is within a Guvnor Package identify all
duplicate rules, overlapping rules, conflicting rules, completeness check
etc.). The "Verify" works within a Guided Decision Table, however it fails
in Guided Editor to to the "Dialect" tag. Even then its within a specific
rule, what I am looking for is the ability to perform this analysis across
all rules in a package (or if possible across packages as well).
Thanks,
dme
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-Static-Analysis-Verification-tp401...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months