Without knowledge of your use case or domain model the below seems
reasonable!
Cheers,
Mike
_____
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Lake Pancake
Sent: 30 May 2008 13:33
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Re: Old drools-spring project
Thanks for the reply. I was primarily attracted to spring-drools because of
the use of Java to define complex logic in the conditions, but I have since
found this old thread that summarizes pretty nicely how to do that without
spring-drools:
http://article.gmane.org/gmane.comp.java.drools.user/1204
Based on the above suggestion of using "facts" I've come up with the
following rule:
rule "Decline Request"
dialect "mvel"
when
request : Request( status == ( RequestStatus.validated ) )
Condition( request == request, failed == "true" )
then
request.setStatus( requestStatus.declined );
update( request );
end
Then I insert into the session Java classes that extend my Condition
abstract. Each Condition contains the request, and should any Condition
return true from its getFailed method, then the request is declined.
Seem reasonable?
On Thu, May 29, 2008 at 8:32 AM, Lake Pancake <lakepancake(a)gmail.com> wrote:
I found this:
http://docs.codehaus.org/display/DROOLS/Drools+Spring+Tutorial
The latest version available for drools-spring appears to be 2.5-beta-1. Is
it stable and does it work with Drools 4 or should I stay away?
Thanks