A web service powered by Spring and Drools

For the past few years I have been designing and building web services which make use of decision management technology such as Drools and FICO Blaze Advisor. The past year or so has all been about using Drools Guvnor to enable business users (legal and operations teams) manage rules, and using the Drools rules engine to evaluate trade requests against those rules.

My preference in setting up web services is to use the Spring Framework to configure my application and manage its various components. However, I struggled to find much information online about how best to wire up a Spring web application to make use of Drools for rules evaluation. The Drools documentation does include a chapter on Spring integration, but I found that it didn’t seem to make the integration any simpler, and forced dependencies on older versions of Spring that I didn’t want to use. In the end, I decided to hand-crank the integration in my application, and it turned out to be quite easy to do.

So in the hope that it might be useful to someone else, I have knocked up an example project, which configures web services, which are backed by services that each make use of a Drools knowledge base to make decisions. That project can be found at GitHub:

https://github.com/gratiartis/sctrcd-fx-web

Feel free to grab a copy and play around with it. It’s built with Maven, and generates a Java web application, which makes use of Spring and Drools to provide a number of web services that could be part of a foreign exchange payments system. I won’t talk about it in depth now though, as it makes use of a variety of technologies. I will soon be posting more, talking about different specific aspects of that project.

Leave a comment

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