[rules-dev] Why are fundamental API functions not part of "stable"?

Mark Proctor mproctor at codehaus.org
Sat Aug 21 13:12:30 EDT 2010


  On 21/08/2010 07:54, Wolfgang Laun wrote:
> On 20 August 2010 21:56, Mark Proctor<mproctor at codehaus.org>  wrote:
>> try this:
>>          for ( KnowledgePackage pkg : kbase.getKnowledgePackages() ) {
>>              for ( org.drools.definition.rule.Rule rule : pkg.getRules() ) {
>>                  String name = rule.getName();
>>                  org.drools.rule.Rule realRule = ( org.drools.rule.Rule
>> ) ((KnowledgePackageImp)pkg).getRule( name );
>>                  System.out.println( realRule.getAgendaGroup() );
>>              }
>>          }
> Very well hidden - almost an 'Easter egg ;-)
> Thank you!
Sorry I probably didn't make myself clear, all of the old api is 
available via one way or another. In the above we cast to the 
implementation to return a org.drools.definition.rule.Rule that is 
castable. In some other cases the old session interface of rulebase 
interface is availlable as a field on the ksession impl or kbase impl. 
So it's all there, it's just "internal". But yes in general you'll need 
to look at the impl to figure out what can be done where.

Mark
>> At the drl it'll stay, for backwards comptability for a while, we'll map
>> it onto the new planned constructs. I have plans over all for something
>> more generic, orthogonal and thus more flexible and powerful.
> At one time, I thought that the metadata map would be the place where
> things are kept. - I canimagine that a selection mechanism based on
> s.th. like general property predicates would give you all you've got now
> (possibly even with long-term backward compatibility) and plenty of new
> possibilities. "Sharing" of rule sets among focusable grouds is one thing
> I'd very much like to have...
>
> -W
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>




More information about the rules-dev mailing list