Sunday, October 26, 2008

While everyone was having fun at ORF... (some of us got some work done !)

I (Michael) was not able to travel to texas for the meetup, due to an imminent addition to the family.

However, with the wonders of 2003 technology I was able to "attend" in a sense - Skype and Elluminate (skype had nicest voice quality - at least to my ears).

Just a quick update of some new features that fell out of some work that happened during ORF/rule meetup:

Jeff Delong requested that the Scenario runner be able to show an "audit log" of events (tracing the execution of the rules - this is similar to what you can do in the IDE using the logging event listener and the plugin. This was relatively easy to to:

So after you run a scenario, you can show the event log to trace the execution - very useful for explaining how the rules came to a certain conclusion. This shows all events (including ruleflow should it be invoked). Note that if you are using "pojo" facts, be sure to put in a sensible toString() method to show the state (the above ones did not, hence the "pointer address" style messages !).

Michael from Franklin American was at the rules meetup, and contributed a feature called "category rules" (more details on this in future) - it is a really clever idea: you specify that rules tagged in a certain category "extend" a specified rule. Before he could do this he had to add the "extends" feature to rules - so a rule can extend another rule (it "inherits" the conditional part - just single inheritance - very simple !).
(excuse my random keyboard-mashing names - unseasonal cold weather has locked up my joints for typing !). This is quite a neat idea - you could use it to simplify rule authoring so that the mere fact that a rule belongs in a certain category implicitly applies extra filtering constraints to it (that was the case Michael had in mind, I am sure he will provide a more concrete example in the future).

Also, Joe of Recondotech contributed an enhancement to DSL's to allow drop downs, dates and such to be configured in a DSL and an editor rendered accordingly - which provides a more user friendly way of building form-style UIs for business users.


  1. Concerning the bit on "category rules" - that sounds quite a bit like rule subsumption. Rule subsumption is something that means that if there are two rules

    rule1 IF A and B and C
    THEN X

    rule2 if A and B
    THEN Y

    rule2 is subsumed by rule1 bacause it is contained in rule1. This is covered in some detail on p. 264, 267,268 in G&R, 4th Ed. If the two rules had the same conclusion somewhere then it's even worse because it is basically a duplicate rule. However, even with different actions this is some cause for uncertainty.

    I have repeatedly asked ILOG and Blaze Advisor about rule inheritance and how they avoid rule subsumption with this feature but have never gotten a decent answer other than they would look into into it.


  2. James could also have added that rule inheritance has long been a feature in at least one leading commercial BRE. Good to see it being implemented in DROOLS - it might even become a candidate for rule standards like PRR!

  3. @Paul

    Yes, we wanted to add this feature to Drools for a long time now, but it never got into our "priority window". :) The good news is that Michael Rhoden did a great job and got that implemented in the core engine during our bootcamp and also built, on top of that, higher level support for it in Guvnor by using categories.
    Hope to meet you again in BRF and have a couple beers.


    The user has the power to control what he wants executed or not by enabling/disabling the higher level rules, at the same time seizing the intrinsic characteristics of Rete and its optimizations (like node sharing) for increased flexibility and execution performance.


  4. Will it be possible to use a global variable declared in one drl file in another drl file.

  5. There are many Online Coursework writing services and Help with Coursework Writing services to choose from for those stuck with their psychology coursework writing services and nursing coursework writing help services.