[rules-users] Re: Old drools-spring project

Lake Pancake lakepancake at gmail.com
Fri May 30 08:33:11 EDT 2008


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/bfb8b882/attachment.html 


More information about the rules-users mailing list