[rules-users] Re: Old drools-spring project
Anstis, Michael (M.)
manstis1 at ford.com
Fri May 30 08:58:14 EDT 2008
Without knowledge of your use case or domain model the below seems
reasonable!
Cheers,
Mike
_____
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Lake Pancake
Sent: 30 May 2008 13:33
To: rules-users at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080530/96caf562/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7206 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080530/96caf562/attachment.bin
More information about the rules-users
mailing list