Hi folks,
This may well be rather premature, but I have been knocking up a little example project to
demo a web application built with Spring 4 and Drools 6. Notably, *not* using the Drools
Spring componentry because I prefer to roll my own Spring components. It gives me a lot of
freedom to make things work how I like. I mention this, as there seem to be a lot of folks
on this list with problems relating to getting their Drools Spring XML config working, and
I wanted to show how easy it is to roll your own. There’s really not much code involved.
To try it out:
git clone git@github.com:gratiartis/qzr.git
cd qzr
mvn clean install
cd qzr-web
mvn tomcat7:run
And open:
http://localhost:9090/
It seems to work fine on OSX and Windows 7. Hopefully it works for other platforms too.
As I mention, this may be somewhat premature, because the application is very much a work
in progress (likely to be refactored lots!) and doesn’t do a lot yet. It creates a
KieSession attached to the HTTP session of each user, so that users can have a chatty
relationship with the rules engine. There is a web page which uses JavaScript to call a
REST API to get data such as “questions”, which have been inferred in the rules engine.
The idea being to have a conversation whereby the rules engine asks a question and the
user’s response will be inserted as a knew ‘known’ fact. The rules are fired again to
determine what is now known and what additional questions should be asked.
I have plenty of vague ideas relating to future functionality, so I’ll be beavering away
at it. However, if anybody has thoughts on functionality which would be worth demoing,
then feel free to fire your thoughts in my direction and I’ll see what I can do. If
anybody looks closely enough to spot any bugs, then feel free to mention them (I think you
can raise issues on the GitHub project), although there’s a pretty good chance that
they’re just incomplete functionality.
Hopefully it’s useful to someone. Enjoy!
Steve