Phil 3.28.12

8:00 – 4:30 CSIP

  • Visualizing Drools (Visualizing Inference Process of a Rule Engine – VINCI’11, August 4–5, 2011, Hong Kong, China.)
  • Onward with chapter 2
    • When there is one or more Activations on the Agenda they are said to be in conflict, and a conflict resolver strategy is used to determine the order of execution. At the simplest level the default strategy uses salience to determine rule priority. Each rule has a default value of 0, the higher the value the higher the priority.
  • Sheesh, had a whole slew of computer problems this morning. I was missing dlls, Some projects were pointing to debug libraries so they couldn’t distribute properly, and then my TortoiseSVN  just… evaporated. Had to reboot, reinstall, and reboot again. Everything appears to be working now though.
  • Wish I could find where this tool (RuleFlow?) is hidden in eclipse
  • Chapter 3: Advanced Concepts and Theory
    • After regular inserts you have to retract facts explicitly. With logical assertions, the fact that was asserted will be automatically retracted when the conditions that asserted it in the first place are no longer true
    • It is important to note that for Truth Maintenance (and logical assertions) to work at all, your Fact objects (which may be JavaBeans) must override equals and hashCode methods (from java.lang.Object) correctly. As the truth maintenance system needs to know when two different physical objects are equal in value, both equals and hashCode must be overridden correctly, as per the Java standard.
  • Chapter 4: User Guide
  • ‘Hello world’ setup”
    • KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
      // Check the builder for errors
      if( kbuilder.hasErrors() ) {
          System.out.println( kbuilder.getErrors() );
      // Resources of any type can be added iteratively
      kbuilder.add( ResourceFactory.newFileResource( "/project/myrules1.drl" ), ResourceType.DRL);
      kbuilder.add( ResourceFactory.newFileResource( "/project/myrules2.drl" ), ResourceType.DRL);
      if( kbuilder.hasErrors() ) {
          System.out.println( kbuilder.getErrors() );
      Collection<KnowledgePackage> kpkgs = kbuilder.getKnowledgePackages();
  • Ok, this is a nice introduction to concepts, but I’m not really getting the opportunity to build something in an kind of understandable way. There’s not much documentation, and only one book that appears to provide the overview – That’s the “Drools JBoss Rules 5.0 Developer’s Guide”. The reviews on Amazon are mixed, leaning to bad, but it’s the only game in town. I’ve bought and downloaded the Kindle edition and will try that tomorrow.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.