Greetings! Recently I've been working on a piece of software that will require a rule engine to implement dynamically changing business logic.

I've read a bunch about a number of different open source projects currently out there including JBoss/Drools/Java scripting engines recently added to the JDK/ etc.

I'm pretty much set on using one of two methods:

Java Scripting engine

The problem I'm having with Drools is actually getting it setup to accept an xml file with the associated rules. I've read the articles on IBM and several other tutorials but I can't get my head around exactly what objects need to be instantiated to get the engine itself up and running. I sort of understand the WorkingMemory objects but beyond that I"m lost. I've read through the API, but I"m still at that point where I think I know I lot about java but still aren't quite comfortable sifting through the api to find what I'm looking for.

Anyway, I've been over the below link in particular a 100 times. I could use some insight into how to go about setting up this particular rule engine. It's kicking my butt.

Implement business logic with the Drools rules engine

As for using a Java scripting rule engine, I've read through the below link and I feel pretty comfortable implementing this rule engine, but here's the rub:

I prefer how the rules are created using the Drool engine as the rules are written to an xml file (with java condition and consequence tags) and java does that fairly easily and with a very robust toString method I can manage my rules in a convenient manner. Using this scripting engine, it looks like I have to write my rules, for example, using JavaScript and saving them in a js file. This, on the surface, seems to be a daunting task. Any Thoughts on how to easily manage and maintain a list of rules that can change daily using JavaScript? Is there a similar way to use xml files to store rules (if-then conditions) and use this scripting engine instead of Drools?

Scripting for the Java Platform

I know it's a lot but any thoughts/suggestions would be immensely appreciated. Thanks a bunch!