Reputation: 13773
I am using Drools' decision table mechanism for generating rules.
How can I determine the number of rules that were generated?
Upvotes: 2
Views: 1566
Reputation: 31290
int nRules = 0;
Collection<KiePackage> packages = kieBase.getKiePackages();
for( KiePackage pack: packages ){
nRules += pack.getRules().size();
}
You can also count the rows below the header lines in your decision table: one row - one rule.
Upvotes: 5