[rules-users] 6.0.0: Is this the right way to access DB on LHS?

SrjTx clickthex at yahoo.com
Fri Dec 6 13:19:58 EST 2013


Before I go down the path of fleshing the rest of this out, I want to know if
this is the right approach.

I have a database with LOTS of data entries.  I have a bean that provides
access to that data (ListAccess).  It has a method "iHaveOne" that returns
true if the argument is contained in the list.

Is the following how one should go about this?

Other/better ways?



package blah;

import dba.ListAccess; // bean which access database
import goodstuff.Thing; // fact in drools

  rule "qqq"
  when
    $thing:Thing()
    $listAccess:ListAccess()
    eval( $listAccess.iHaveOne($thing.id) )
  then
    do stuff
  end




--
View this message in context: http://drools.46999.n3.nabble.com/6-0-0-Is-this-the-right-way-to-access-DB-on-LHS-tp4027134.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list