Hi,

I've just finished building a small proof-of-concept that uses a database to store rules and provides a simplified interface to the Drools engine to the client. The client calls named rulesets using the interface and the rules are loaded from the database.

There is also a web interface to maintain the rules. The rulesets are stored atomically, ie as normalized data instead of as a .drl file (CLOB data). The web interface is built using Spring MVC. The database object abstraction is built using Hibernate. The body of the conditions and consequences are scriptable using Python or extendable using small Java classes. I did the Petstore example using both approaches to illustrate the usage.

If there is interest in this sort of thing, please let me know. I would be happy to write up this stuff with the code, perhaps in the user stories section of the drools site.

Thanks
Sujit

Hamu, Dave wrote:
Mark & Drools Community:

I am interested in the question of using rules engines (Drools, in
particular, with frameworks such as the Spring Framework), which
Leonardo discussed in his e-mail (below).  Can someone elaborate more
fully on the reason that Drools or other rules engines cannot be used
within the Spring framework.  I understand that a key feature of Spring
is that it is a pojo framework and that it uses the "Hollywood
Principle".  I have not had any hands-on experience with Spring, but
there are many aspects of the framework that I have gleaned from my
readings that make Spring very attractive to me.

I have long been critical of Struts, because it is needlessly complex
and unfortunately so heavily reliant on EJB's.  In contrast, I favor the
concepts advocated by Rod Johnson which are exploited in Spring.  I
realize that that this is a bit tangential from the Drools community's
focus, however, there is an inherent elegance in pairing a rules engine
with an application framework.
So, I would like to encourage some discussion on the following topics:

1) Practical approaches for using Drools with Application Frameworks
2) Problems with using Drools with Application Frameworks
3) Using Drools along with Workflow and/or BPM  (some ideas about where
Drools is going as part of the JBOSS stack would be beneficial)

I am working with a very novel application framework concept that is an
original product within the team that I work with at Avnet.  The
framework is a command-controller/front-controller framework based on
concepts published on sun.java.com.  This framework has some interesting
features:

1) It is readily extended to invoke a rules engine on demand (we have
not exploited this yet, but we have some prototype code for this)
2) It is easy to implement workflow within the framework (and we have
exploited this to a limited extent)

The chief problem with our in-house designed framework is that it is not
an open-source product and not supported by vast number of developers
(just our team).  On the one hand, it would be interesting to see our
framework adopted by a community of developers (although this may not be
practical), or alternately, it might be beneficial for us to replace the
our core framework with a framework that is widely supported in the Java
Community.

Thanks in advance for your thoughts on Drools and Application
Frameworks.

Happy Holidays!

- Dave
-----Original Message-----
From: Mark Proctor [mailto:[EMAIL PROTECTED] Sent: Friday, December 23, 2005 7:25 PM
To: user@drools.codehaus.org
Subject: Re: [drools-user] setting application-data with spring drools

It is simply not possible to support the power of a rule engines in the
current pojo/spring approach. Drools 2.5 now compiles rules down to
pojos, it is possible to reference these pojo's interfaces and unit test
those - we produce the a src jar for these rules so you can also debug
them.

Mark
Leonardo Susatyo wrote:

Is it true that Spring for Drools will not be supported in the future?


If so, what will be the alternative b/c i kind of like the spring approach for easier unit testing


thanks

--- Geoffrey Wiseman <[EMAIL PROTECTED]>
wrote:

On 12/20/05, Leonardo Susatyo <[EMAIL PROTECTED]>
wrote:
Could anyone please tell me how can I define application-data in rulebase if i'm using drools-spring?

My knowledge in this area is pretty dated; when we last tried to do that, we were on 2.0, possibly not even final, and we couldn't do it;


application data didn't seem to be working with annotated rules, and it was suggested that injection of rules via Spring was a preferred route for this approach; we ended up moving to that, althogh there are instances where this is not very well suited.

For instance, if your rules are meant to be parameterized by a processing data, this is something that can be passed in on a per-invocation basis with Application Data but cannot easily be injected.

I can't speak to whether or not this has been resolved, and I should point out (before Mark does) that Spring/Drools is deprecated in the Drools 3.0line, so that's something to consider.

ps: i saw a defect DROOLS 322, is it related?


Codehaus Jira is down, or at least not responding to my attempts to access it at the moment, so I can't say.

--
Geoffrey Wiseman




                
__________________________________________
Yahoo! DSL -- Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com





Reply via email to