Drools 4.0.7 - call for testers
by Edson Tirelli
All,
We are about to release Drools 4.0.7, but we want to improve QA for the
community version. We have a good amount of unit and integration tests, but
we would like to ask those of you using Drools 4.0.x to checkout and try
4.0.7 before we do the official release, in order to ensure 4.0.7 covers
your use case. This way, if by any chance you find a problem or regression,
we can address it and include in 4.0.7 version.
To checkout the code:
http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/
Instructions on how to build are in the manual, but being short, you
need maven 2.0.8 and you should run:
mvn -Ddocumentation -Declipse clean install
If you have any problems with that, check the manual.
We are setting a short deadline. We will wait for reports until end of
day tomorrow, so hurry up. We are not sure at this point if we will release
another community version in the 4.0.x series or the next release will be
5.0.0, so if you use drools 4.0.x, it is advisable you take the time to do
this check.
Thanks a lot
Edson
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
16 years, 8 months
Missing package name for rule package
by satyajit samal
Hi All,
I am really new to drools 4.0,
I am trying to use guided editor for business rules (.brl) in eclipse 3.3 .
First I am converting the .brl into .drl using BRXMLPersistence and
BRDRLPersistence then when calling
addPackageFromDrl() method of PackageBuilder it throws
org.drools.compiler.PackageBuilder$MissingPackageNameException: Missing
package name for rule package.
I have added the package and import statements in "rule.package" but it not
able to find the package after it got converted to .drl.
Is this the approach we follow? If yes How to resolve this issue.
If no what is the approach can some one send me sample code for this.
thanks in advance
satnew
**
*
*
16 years, 8 months
[solver] ITC2007 competition results
by Geoffrey De Smet
Hi guys,
I finished 4th with my drools-solver implementation of the examination
track:
http://www.cs.qub.ac.uk/itc2007/winner/finalorder.htm
There's much to learn from the other implementations for drools-solver.
For example, the winner is also using local search (as are most of the
others), but he use meta-heuristics to run 3 phases instead of 1,
selects his moves a lot smarter and just basically tweaked his
configuration a lot better.
Surprisingly, I actually got the best overal result on dataset10: it
will be interesting to find out why (could be tweaking luck though).
I 'll be identifying the features which drools-solver is missing and
incorporating them soon.
Since the end of the competition, the trunk has already gained 10%
performance (due to removing shadow facts etc).
I've also done an implementation of the curriculum course track after
the competition ended, in less than 16 workings hours.
The mere development speed, maintainability and runtime performance
(after initialization...) of DRL score rules is very very promising.
--
With kind regards,
Geoffrey De Smet
16 years, 8 months
drools-spring and drools-guice
by Mark Proctor
I'd like to add two sub projects to Drools to enable better spring and
guice support - especially now we have the RuleAgent. Any volunteers for
this? I'd like to try and standardise, as much as possible, how Drools
works and integrates with IoC containers.
Ultimiately the integration should be quite lightweight - mostly about
creating rulebases and working memory and probably the scoping and
caching of these. I guess you could also have some life cycle management
about objects themselves and auto assertion/retraction to named working
memories. We'd need to define a set of agreed annotations to define
these things, that would work across containers. I believe the JBoss MC
people have done some work in this area, I have cc'd to see if they have
any input or documentation pointers.
The core dev team don't have the time and aren't spring/guice
specialists - so anyone willing to take this up? If we can get
reasonable implementations we will add them to subversion (and the
authors commit rights), and make part of the next release - assuming
they are of good enough quality.
So any takers, maybe we could atleast start at defining what this level
of integration should look like?
Mark
16 years, 8 months
Drools 3.0.6 to 4.0.4 migration
by Dennis Ryan
Hi,
I've migrated from 3.0.6 to 4.0.4 of drools and an existing test case is now failing. The test case tests dynamically changing the rules by adding a rule file to the existing rulesBase that is a completely new package, then asserting that the existing rules fire and the newly added rules fire. Up to this point it works as expected, the original package of base rules fire and the newly added package of rules fires also. Next it adds new rules that essentially replace the ones just added and fires the rules again. This time only the newest rules added fire and the existing rules that did not change at all and are in a completely different package then the rules just added DIDN'T fire. Upon some debugging it looks like the ruleBase has both packages, the existing package and the latest updated rules package, in it.
any advice appreciated please!!!!
thanks in advance!
here the test:
public void testUpdatingPackage() throws Exception {
logger.info("--------- testUpdatingPackage ----------");
//reinitialize ruleBaseBuilder - some base rules that i always want to run
ruleBaseBuilder.setRuleFile("com/xxx/coreservice/um/rules/um.drl");
String userName = "user";
CsUser user = Helpers.createUser(userName, userName, null);
// Set the displayname to null. If the default rules fire,
// it should be populated after running the rules.
user.setDisplayName(null);
user.setDescription("base");
// Add product's rules on the fly - some new rules
ruleBaseBuilder.addRulesFile("com/xxx/coreservice/um/ext/rules/p1.drl");
ruleInterceptor.addUser(user);
// assert that the default rule is invoked by checking the display name
assertEquals(user.getSurname() + ", " + user.getGivenName(), user.getDisplayName());
// Check that the product extension did run
logger.info("User's description: " + user.getDescription());
assertTrue(user.getDescription().indexOf("p1ext") > 0);
// now update product's rules on the fly - change some of the new rules!
ruleBaseBuilder.addRulesFile("com/xxx/coreservice/um/ext/rules/p1updated.drl");
user = Helpers.createUser(userName, userName, null);
// Set the displayname to null. If the default rules fire,
// it should be populated after running the rules.
user.setDisplayName(null);
user.setDescription("base");
ruleInterceptor.addUser(user);
// assert that the default rule is invoked by checking the display name - ASSERTION FAILS HERE because the original base rules dont fire and they are supposed to fill in displayName
assertEquals(user.getSurname() + ", " + user.getGivenName(), user.getDisplayName());
// Check that the updated product extension did run
logger.info("User's description: " + user.getDescription());
assertTrue(user.getDescription().indexOf("p1extupdated") > 0);
// This is to check that the old rule didn't run.
assertEquals(user.getDescription().indexOf("p1extupdated"),
user.getDescription().indexOf("p1ext"));
}
and the rules:
//---------------------p1updated-------------------------
package com.xxx.coreservice.um.ext.rules
import com.xxx.coreservice.persistence.user.CsUser;
import com.xxx.common.logging.client.Logger;
// TODO: Can these globals be inherited?
global Logger logger;
// TODO: Can this method be put into a helper?
// The disadvantage with that is that now we don't really know which rule file the log
// was coming from.
function void log(Logger logger, String msg) {
if (logger.isFineEnabled()) {
logger.fine(msg);
}
}
rule "testRule"
no-loop true
agenda-group "um_add"
when
user : CsUser()
then
log(logger, "P1 updated test rule");
user.setDescription(user.getDescription() + ".p1extupdated");
end
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
16 years, 8 months
Fwd: [antlr-interest] Java 1.5 grammar updated
by Edson Tirelli
Just FYI, see Terence's e-mail bellow.
Since:
1. we have no complains so far with our ability to parse java files
2. we have hacks built into the java grammar to support things like modify
block and updating it to a new grammar may require more than a simple copy
and paste operation.
I'm not going to update our grammar at this moment.
If we feel the need, I may do it in the future.
If anybody sees any problem with this approach, just yell your reasons,
plz.
[]s
Edson
---------- Forwarded message ----------
From: Terence Parr <parrt(a)cs.usfca.edu>
Date: 2008/3/19
Subject: [antlr-interest] Java 1.5 grammar updated
To: antlr-interest Interest <antlr-interest(a)antlr.org>
Hi, thanks to John Ridgway, we have a major set of fixes to Java.g
http://www.antlr.org/grammar/1152141644268/Java.g
Parses JDK 1.5 source he says.
Terence
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
16 years, 8 months
Questionable Exception Handling
by Zoltan Farkas
I was browsing through the drools source code
I am not a fan of seeing catching Throwable in any java code ...
I see this in class org.drools.util.ClassUtils:
/**
* This method will attempt to create an instance of the specified
Class. It uses
* a syncrhonized HashMap to cache the reflection Class lookup.
* @param className
* @return
*/
public static Object instantiateObject(String className) {
Class cls = (Class) ClassUtils.classes.get( className );
if ( cls == null ) {
try {
cls = Class.forName( className );
ClassUtils.classes.put( className, cls );
} catch ( Throwable e ) {
throw new RuntimeException("Unable to load class '" +
className + "'", e );
}
}
Object object = null;
try {
object = cls.newInstance();
} catch ( Throwable e ) {
throw new RuntimeException("Unable to instantiate object for
class '" + className + "'", e );
}
return object;
}
I believe this masks important errors where the application should not
continue to run and it would be preferable to crash...
--zoly
16 years, 8 months
What the.... is happening?
by mmquelo massi
Sorry guys,
but I can't understand why u released 4.0.5 a couple of weeks ago, then u
suddenly released
a brand new "4.0.6" release few days ago (which I promptly downloaded) and
now u put back again
the "4.0.4"....???....
*Why???*
What is the stable one????
Does the svn is working?? Should we build from repository or shouldn't we?
Looking forward to hearing any news on this matter....
Thank you anyway.
Bye.
Massimiliano
16 years, 8 months
Re: [rules-dev] BRMS and Fit for Rules
by JoelA
Is there anything more to add on this?
We are in the same situation as Paul and are considering elaborating
fit-for-rules or writing our own fit/fitnesse stuff (maybe more like
Servicefixture). We hope to have business types take care of testing their
rules based on pkgs dev provides them.
I've also read this post:
http://blog.athico.com/2007/12/testing-rules-introduction.html
What's the status on this 'integrated testing tool' mentioned in the blog?
Joel
Paul Browne wrote:
>
> As part of the some 'stuff' (you may be able to guess!) found myself r
> needing to integrate FIT for Rules and the BRMS. No big deal in doing
> the integration, just plugged in a new BRMSEngine fixture instead of the
> existing Engine fixture.
>
> Two questions
> a) This code is generic - would you be interested in a copy for the Fit
> for Rules project? There are other (minor) updates to the code.
> or
> b) Do you have something big up your sleeve that will (soon) make this
> redundant (i.e. the QA Tab on the BRMS). Trouble is , would like to
> write this up now(!). Am I right in assuming the 'QA' tab will
> effectively be Fit for Rules integrated into the BRMS? (in which case
> the samples will be easy to port later).
>
> Ta
>
> Paul
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
--
View this message in context: http://www.nabble.com/BRMS-and-Fit-for-Rules-tp15334736p16442903.html
Sent from the drools - dev mailing list archive at Nabble.com.
16 years, 8 months