≡ Menu

First Look – Drools 5.0


When I was in the UK recently I got a chance to have a coffee with Mark Proctor and get a detailed demo of the new Drools release – 5.0.

Mark spent most of the time showing Guvnor, the new web-based business rule management system for Drools. Built with GWT this looks and works great – nothing like a browser application, much more like a real desktop application. Navigating around, open multiple tabs, viewing and editing various assets was all very elegant and responsive. Asset storage uses the Java Content Repository (JSR 170) standard allowing it to use both open source and commercial storage platforms (it ships with JackRabbit, an open source implementation) and ensuring your content is not locked up in a closed proprietary format. Versioning and logging of edits/comments, comments and comparisons and a hierarchical view of the assets being stored were all available making repository navigation easy. A WebDAV interface to the repository is also available allowing remote file storage and access and there is an Eclipse team provider allowing developers to synchronize their development environments with the JCR repository. Authentication is handled through Java Authentication and Authorization Service (JAAS) (so Drools does not require additional authentication beyond what you already use) and roles are defined for users and then used to control the user interface. Import and export of XML packages from the repository rounded out the features I saw. Overall I was impressed with Guvnor and most of what Mark showed me of other features was done from within the browser environment.

5.0 adds a web-based decision table editor as well as a web-based ruleflow viewer that uses GWT Diagrams to show flows (they plan web-based editing of flows in the future, but for now the editing of the flows must be done in Eclipse. The ruleflow editor has been upgraded pretty significantly too into much more of a real decision flow editor or even a workflow editor. The editor is slick and has a nice pallette of features. Splits, joins, for each, subflows, human tasks, timers and an interface allowing you to add you own kinds of nodes make the flow much more extensive than before. DSLs (of which more in a second) can be built allowing DSL nodes to be created in the flow to make it very business user friendly. There are a few oddities around defining the rules for a node and navigating from the ruleflow to the rules but overall I really liked what they have done.

DSLs – domain specific languages – get an upgrade in 5.0. A DSL in Drools is essentially a sentence, written for non-technical consumption, that maps to a condition or action statement for use in a rule. Variables can be defined in the sentence, and then used in the rule statement, allowing the engine to execute the rule based on the DSLs selected, the variables entered and the mappin of the sentence text to rule syntax. For 5.0 the parser has been rewritten and some extensions added, such as use of regex in the templates. More importantly, however, is the integration of DSLs with the rest of the interface. As noted above the flow can use DSL nodes and the guided editor, itself a nice piece of web-based coded, can mix and match DSL statements and pure rules syntax. This allows business users to stick to DSLs, analysts to mix and match DSLs and syntax and programmers to do whatever they like. It does not allow as much customizaion of the interface as some approaches but it certaintly provides a great core.

Scenario testing has been added to Drools 5.0 as it has been to a number of commercial platforms over the last few years. Although it does not support Junit, it has a nice web-based interface that supports some rule verification, coverage, field usage, missing values and other testing. I would like to see JUnit integration – after all rules are only part of an applicaiton and supporting Junit allows all the tests to be run together.

Deployment has also had some improvement with some nice package deployment features and the ability to deploy a very lightweight service that then pulls files, packages, snapshots from the repository as needed to update the local rules being compiled and executed.

Overall this looks like a very strong release, especially with some of the core engine enhancements around temporal reasoning, support for XSDs and delarative type modeling. If the commercial vendors did not think they had a real competition on their hands, Mark and his team will prove them wrong with 5.0. Drools 5.0 is not yet ready for release (they are hoping for a November release) but those of you who like playing with, and contributing to, code that is nearly ready can get it from the downloads page (scroll down). Michael Neale posted Drools 5.0 M2 New and Noteworthy Summary recently and Drools 5.0 M1 – New and Noteworthy before that. You can get periodic updates on the world of Drools from Mark and Michael on their blog.


Comments on this entry are closed.

  • James Owen October 14, 2008, 11:04 pm

    James – Nice review for a one-afternoon walk-through.  🙂  I’ve been promising and promising Mark that I would help with 5.0 but I think I’m too late for that one – maybe 5.5 or something…  What I’m really interested in is stretching it to the limits of its use and doing a full comparison to ILOG JRules and Blaze Advisor, both of which I know (for now) better than Drools.  Maybe by the first of the year I can say something really intelligent about it but, for now, I’ll withhold judgement.  

    You are right about one thing though; the commercial vendors such as Fair Isaac and ILOG (now IBM) had better watch their rearview mirrors really closely because there is an open source product (Drools) coming up their backdraft really quickly.  Maybe not 5.0 but 5.5 or 6.0 (unless both improve dramatically) should make the market place really interesting.


  • peter lin October 15, 2008, 6:53 am

    Hi james,

    I agree with you drools 5 is making great progress. There’s one thing I would like to point out about drools 5, which should cause concern for users. The “new” asymmetrical Rete feature is a big mistake in my mind. It is equivalent to telling users “go ahead and modify the database file directly and by pass the database.” Clearly, that is wrong and violates well established transaction theory and practice. I’ve tried my best to convince drools to go with a simpler approach, which gives users the option of telling the engine which facts should be shadowed. The current drools api has insert(Object).   The simpler solution is to add a new method insert(Object, boolean shadowed). This is more flexible and gives users the choice. Plus, it doesn’t violate transaction principles. I know mark has been hyping asymmetrical for almost a year now. As far as I’m concerned, it’s a step backwards for rule engines.

    Having said that, I think the over all suite is still solid and users should continue to use it. I still recommend it to developers who ask me. I caution people not to use the new asymmetric feature.

  • MehdiCHM March 17, 2010, 2:47 am

    I want to ask you if drools 5 have the concept of “Machine learning or rule learner”. It’s for automatic reproduction of rules.
    And the rule Compressor and validation of rules(contradiction between rules,…)

    Thanks for answering Me.