Next Release 4.2
by Mark Proctor
I wan't to make the next release happen quicky, ideally 3 months or so.
This release will be jdk1.5 and above and Eclipse will move to 3.3,
there will be no more jdk1.4 or Eclipse 3.2 releases. The two main
focuses for the next release are:
Analytics
Testing
I also want to enhance the engine for the following:
Pluggeable evaluators
Pluggeable extractors
Pluggeable Parsers with Clips Parser
Multiple patterns inside of accumulate
Else labels (ala opsj)
Pushed based 'from' where services can "push" data into a from node.
Rewritteable data sources, where HQL is dynamically generated to move
the pattern constraints into the database
-Person( miles > 1000 ) from dataSource will internally be rewritten
as Person() from dataSource; where the dataSource now applies the miles
> 1000.
RuleAgent should be able to handle drls directly, not just binary packages.
I expect a number of other smaller things will make there way in as
well. We will decide on Eclipse/RuleFlow/BRMS updates shortly.
Mark
17 years, 5 months
JBoss Drools 4.0 Released
by Mark Proctor
JBoss Drools 4.0 has just been released :) We are really proud of what
we have done here. We believe that we now have the best and most
powerful declarative rule language, bar none; commercial or open source.
The Rule Flow is excellent and I really enjoyed updating the Conway's
Game of Life to Rule Flow; sub Rule Flows and milestone support will be
coming in a point release soon. The BRMS has long been requested and we
put a lot of effort into the ajax based design. The Eclipse improvements
for the debug points and guided editor should help reduce learning
curves, opening us to new audiences. Of course performance is now much
better, especially for complex rules and the new Sequential Mode should
be very popular with decision services.
Boss Drools 4.0 can be summarised as:
* More expressiveness.
* More powerful declarative keywords.
* Hibernate ready, with 'from' keyword for evaluating external data.
* Pluggable dialects, with new MVEL dialect.
* New Rule Flow and Eclipse modeller.
* Better Performance.
* IDE Improvements.
* Enterprise Ready with Web 2.0 Business Rules Management Studio.
Resources:
* Presentation from Skills Matter
http://wiki.jboss.org/wiki/attach?page=JBossRules%2FSkillsMatter20070711.pdf
* What's new in JBoss Rules 4.0
http://wiki.jboss.org/wiki/attach?page=JBossRules%2Fwhats_new_in_jbossrul...
Enjoy :)
The Drools Team
Mark Proctor, Michael Neale, Edson Tirelli, Kris Verlaenen, Fernando Meyer
http://blog.athico.com
Here is a more detailed enhancements list:
Language Expressiveness Enhancements
* New Conditional Elements: from(hibernate ready), collect, accumulate
and forall
* New Field Constraint operators: not matches, not contains, in, not in,
memberOf, not memberOf
* New Implicit Self Reference field: this
* Full support to Conditional Elements nesting, for First Order Logic
completeness.
* Support to multi-restrictions and constraint connectives && and ||
* Parser improvements to remove previous language limitations, like
character escaping and keyword conflicts
* Support to pluggable dialects and built-in support to Java and MVEL
* Complete rewrite of DSL engine, allowing for full l10n
* Fact attributes auto-vivification for return value restrictions and
inline-eval constraints
* Support to nested accessors, property navigation and simplified
collection, arrays and maps syntax
* Improved support to XML rules
* Experimental Clips parser support
Core Engine Enhancements
* Native support to primitive types, avoiding constant autoboxing
* Transparent optional Shadow Facts
* Rete Network performance improvements for complex rules
* Rule-Flow
* Stateful and Stateless working memories (rule engine sessions)
* Support for Asynchronous Working Memory actions
* Rules Engine Agent for hot deployment and BRMS integration
* Pluggeable dialects and and full support to MVEL scripting language
* Dynamic salience for rules conflict resolution
* Parameterized Queries
* halt command
* Sequential execution mode, faster performance and uses less memory
* Pluggable global variable resolver
IDE Enhancements
* Support for rule break-points on debugging
* WYSIWYG support to rule-flows
* New guided editor for rules authoring
* Upgrade to support all new engine features
Business Rules Management System - BRMS
* User friendly web interface with nice WEB 2.0 ajax features (GWT)
* Package configuration
* Rule Authoring easy to edit rules both with guided editor ( drop-down
menus ) and text editor
* Package compilation and deployment
* Easy deployment with Rule Agent
* Easy to organize with categories and search assets
* Versioning enabled, you can easily replace yours assets with
previously saved
* JCR compliant rule assets repository
Miscellaneous Enhancements
* Slimmed down dependencies and smaller memory footprint
17 years, 5 months
How to compare to Class type in LHS??
by Felipe Piccolini
Hi,
Im trying to compare a field to a Class type but when parsing I
get NPE and when I debug,
the constraint is a ReturnValueConstraint but the
restriction.getRequiredDeclarations()
return a Declaration[] array initializated, but empty, so I can't get
the declaration evaluated...
I needed because I'm working on a kind of parser for the rules for
analisys and testing... but using
the already parsed package.
Here is a pseudo rule for test...
rule "Test A"
when
$mf: MyFact(clazz == (SomeClass.class))
then
System.out.println("Test A: OK");
end
Actualy, the rule compiles (with the NPE output, not stackTrace, just
the java.lang.NullPointerException,
and it works fine.. I mean I get "Test A: OK" as output, but cant get
the SomeClass.class reference when I
look into the debugger.
Is this the right way to compare clases? if not, whats the right way?
(Im trying to not do == "SomeClass")
Felipe Piccolini M.
felipe.piccolini(a)bluesoft.cl
17 years, 5 months
Can't execute rules twice with a second classloader
by Aaron Dixon
I am trying to sequentially perform two rules executions using two
different classloaders in the same VM. I create completely new state
for each execution, yet I still fail on the second execution. I
believe this has to do with some internal static cached state that
JBossRules is maintaining. A snippet of the code and exeception are
shown in this email.
public void demo() throws Exception {
// Save original classloader
ClassLoader original = Thread.currentThread().getContextClassLoader();
// Create Classloader 1 with parent of original
FooClassLoader loader1 = new FooClassLoader(original);
Thread.currentThread().setContextClassLoader(loader1);
testRules();
// Success so far...
// Create Classloader 2 with parent of original
FooClassLoader loader2 = new FooClassLoader(original);
Thread.currentThread().setContextClassLoader(loader2);
testRules();
// Never make it to here.
// Restore
Thread.currentThread().setContextClassLoader(original);
}
private void testRules() throws Exception {
PackageBuilder builder = new PackageBuilder();
Package pkg = buildPackage(new String[] { "Foo.drl" }, builder);
RuleBase base = RuleBaseFactory.newRuleBase();
base.addPackage(pkg);
StatelessSession session = base.newStatelessSession();
final ClassLoader loader =
Thread.currentThread().getContextClassLoader();
Object inst = loader.loadClass("com.foo.Foo").newInstance();
session.execute(new Object[] { inst });
}
Exception in thread "main" java.lang.ClassCastException:
adixon.prototype.rules.classloader.demo.copy.FooShadowProxy
at org.drools.base.adixon.prototype.rules.classloader.demo.copy.Foo$getName.getValue(Unknown
Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:94)
at org.drools.base.evaluators.StringFactory$StringEqualEvaluator.evaluate(StringFactory.java:85)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:584)
at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:63)
at adixon.prototype.rules.classloader.demo.copy.Driver.testRules(Driver.java:47)
at adixon.prototype.rules.classloader.demo.copy.Driver.go(Driver.java:33)
at adixon.prototype.rules.classloader.demo.copy.Driver.main(Driver.java:17)
17 years, 5 months
Examples moving
by Fernando Meyer
Hi peeps,
Just to be consistence, the drools-example directory now contains
examples projects and not an eclipse project anymore:
trunk
-drools-examples
-drools-examples-drl
-drools-examples-brms
-drools-examples-*
Im about to add a xml test project and improve brms examples.
Let me know if something isn't working fine.
Regards
Fernando Meyer
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 8524-1298
JBoss, a division of Red Hat @ www.jboss.com
GPG: 47C0 F16E 0387 F4DF 7EBC 8E3C 7AF1 8D55 AB29 DA3A
17 years, 5 months