[rules-users] Guvnor example how to access rules in database instead sample.drl file?

richard rx74me at yahoo.com
Thu Sep 13 16:56:35 EDT 2012


I guess I don't understand, I am able to pull the rules from the db.

I can see how the helloworld example works because i see stuff being used in
sample.drl. 

Dummy rule : mortgages : RULE
Underage : mortgages : RULE
Bankruptcy history : mortgages : RULE
No bad credit checks : mortgages : RULE
no NINJAs : mortgages : RULE
Row 3 Pricing loans : mortgages : RULE
Row 1 Pricing loans : mortgages : RULE
Row 2 Pricing loans : mortgages : RULE
CreditApproval : mortgages : RULE
RegexDslRule : mortgages : RULE

using the changeset.xml

and using this loop

       for( KnowledgePackage kpkg : kbase.getKnowledgePackages() ) {
    	    Collection<Rule> rules = new ArrayList<Rule>( kpkg.getRules() );
    	    for( Rule rule : rules ) {
    	    	System.out.println( rule.getName().toString() + " : " +
rule.getPackageName().toString() + " : " +
   	    			rule.getKnowledgeType().toString());

    	    }
    	}
       
       

   




--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-example-how-to-access-rules-in-database-instead-sample-drl-file-tp4019713p4019761.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list