[rules-users] How to Access and Execute Rules from Database

techy techluver007 at gmail.com
Fri Jan 23 10:26:03 EST 2009


I do it this way...hope this may help..
 List<Rule> rules = dao.getAllRules();//reads RULE table and returns list of
rule Object
            for (Rule rule : rules)
            {
                try
                {
                    Clob ruleClob = rule.getRuleContent(); //I store
complete rule info in this db clob column
                    if (ruleClob != null
                            && StringUtils.isNotBlank(ruleClob.toString()))
                    {
                        builder.addPackageFromDrl(ruleClob
                                        .getCharacterStream());//add each
rule into package

                       

                    }

                }

                //pkg = builder.getPackage();
               //ruleBase.addPackage(pkg)



learndrools wrote:
> 
> Hi All ,
> 
> I am able to configure oracle database in drools but now i am not able to
> find how can i load rules from the DB and execute them , I gone through
> the
> documentation but not able to get much information or might be i am
> missing
> something.
> 
> If any one can provide me a example or some pointer ,hints then it would
> be
> helpful.
> 
> 
> Regards,
> Ashish
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Access-and-Execute-Rules-from-Database-tp21626109p21626458.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list