{ by david linsin }

November 26, 2006

JBoss Rules Example

More than a year ago I made a small example-like application using the Drools Rules Engine, which is now JBoss Rules, to apply discounts on dispositions. Over the past couple of month I got a lot of feedback on this example. I guess cause I'm the first hit when you search for "drools exmaple" on Google.

So today I updated my example to use the new JBoss Rules Engine. I had to refactor a couple of classes, due to changes in loading the rules from the drl-file. I also ported the old rules-file to use the Drools 3 native rules language, which I must say is way less verbose than the old xml-based language. I packed the old and new drl file with the example, so you get a one to one comparison, in case you'd like to port the example yourself.

I read the complete documentation of JBoss Rules today and it got me very interested in further digging into rules engines. So I'm planning to use a custom DSL to specify the rules, in a future version of the example.


Anonymous said...

Hey i have few doubts, can u please help me. I need to implement JBoss rules in my application. I am new to JBoss rules, can u suggest me few Books or Links which start from the basics of JBoss rules. The documentation given in the JBoss site does not cover the implementation part in detail. It would be of great help if you respond.. thank u.

zolf said...

Hello there,

I need help to setup your example in eclipse IDE.After setting up how do i run your application.please help me as i am new to this technology


david said...

I'm on holidays right now zolf, I'll get back to you asasp.

david said...

Hey zolf,

the example basically consist of a set of JUnit TestCases, that you can run using the JUnit TestRunner integrated in eclipse. That should work.

There is an updated version of my example that you can find here: http://dlinsin.blogspot.com/2007/02/jboss-rules-with-custom-dsl.html. Maybe you wanna check that out.


  • mail(dlinsin@gmail.com)
  • jabber(dlinsin@gmail.com)
  • skype(dlinsin)