[rules-users] List all the rule by name in a rule base

Scott Reed sreed at avacoda.com
Thu Mar 6 18:07:33 EST 2008


That's a lot to expect from a clean API. The RuleBase has Packages, not 
Rules. Methods concerning rules are found in the Package class.
It's easy enough to roll your own. perhaps something like

public List<String>getRuleNames( RuleBase rulebase )
{
List<String> ruleNamess = new ArrayList<String>();
for( Package pkg : rulebase.getPackages())
  for( Rule rule : pkg.getRules())
    ruleNames.add( rule.getName() );
return ruleNames;
}

Christie, Blair's message received 3/6/2008 5:21 PM:
>
> Is there a command to list all the rules by name in a rule base?
>
> Cheers,
>
>  
>
> Blair Christie
>
>  
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080306/c40661cb/attachment.html 


More information about the rules-users mailing list