<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=637355312-30052008><FONT face=Arial 
color=#0000ff size=2>Without knowledge of your use case or domain model the 
below seems reasonable!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=637355312-30052008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=637355312-30052008><FONT face=Arial 
color=#0000ff size=2>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=637355312-30052008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=637355312-30052008><FONT face=Arial 
color=#0000ff size=2>Mike</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
  [mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Lake 
  Pancake<BR><B>Sent:</B> 30 May 2008 13:33<BR><B>To:</B> 
  rules-users@lists.jboss.org<BR><B>Subject:</B> [rules-users] Re: Old 
  drools-spring project<BR></FONT><BR></DIV>
  <DIV></DIV>Thanks for the reply.&nbsp; 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:<BR><BR><A 
  href="http://article.gmane.org/gmane.comp.java.drools.user/1204">http://article.gmane.org/gmane.comp.java.drools.user/1204</A><BR><BR>Based 
  on the above suggestion of using "facts" I've come up with the following 
  rule:<BR><BR>rule "Decline Request"<BR>&nbsp;&nbsp;&nbsp; dialect 
  "mvel"<BR>&nbsp;&nbsp;&nbsp; 
  when<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request : Request( status 
  == ( RequestStatus.validated ) )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  Condition( request == request, failed == "true" )<BR>&nbsp;&nbsp;&nbsp; 
  then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; request.setStatus( 
  requestStatus.declined );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  update( request );<BR>end<BR><BR>Then I insert into the session Java classes 
  that extend my Condition abstract.&nbsp; Each Condition contains the request, 
  and should any Condition return true from its getFailed method, then the 
  request is declined.<BR><BR>Seem reasonable?&nbsp; <BR><BR><BR>
  <DIV class=gmail_quote>On Thu, May 29, 2008 at 8:32 AM, Lake Pancake &lt;<A 
  href="mailto:lakepancake@gmail.com">lakepancake@gmail.com</A>&gt; wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>I 
    found this:<BR><BR><A 
    href="http://docs.codehaus.org/display/DROOLS/Drools+Spring+Tutorial" 
    target=_blank>http://docs.codehaus.org/display/DROOLS/Drools+Spring+Tutorial</A><BR><BR>The 
    latest version available for drools-spring appears to be 2.5-beta-1.&nbsp; 
    Is it stable and does it work with Drools 4 or should I stay 
    away?<BR><BR>Thanks<BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>