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

Wolfgang Laun wolfgang.laun at gmail.com
Fri Aug 20 12:21:25 EDT 2010


Please note that I am and was well aware of org.drools.rule.Rule. But this isn't
available from what you get via StatefulKnowledgeSession, KnowledgeBasae,
KnowledgePackage. See below.

On 20 August 2010 17:46, Mark Proctor <mproctor at codehaus.org> wrote:
>  On 20/08/2010 11:13, Wolfgang Laun wrote:
>> StatefulKnowledgeSession session = ...;
>> for( KnowledgePackage knowledgePackage:
>> session.getKnowledgeBase().getKnowledgePackages() ){
>>       for( Rule rule: knowledgePackage.getRules() ){
>>            ???
>>
>> but it turns out that this "rule" object is of the interface type
>>     org.drools.definition.rule.Rule
>> implemented by
>>     org.drools.definitions.rule.impl.Rule
>> which is just as meagre as the interface. Dead end, apparently.
>
> You looked at the wrong implementation. Notice that Rule is also
> implemented by org.drools.rule.Rule. That one has the meat you need.
>

This is what I wrote:

>> Using other classes like Package or RuleBase from the "unstable" part
>> of the API to get at
>> the "real meat" in org.drools.rule.Rule isn't really a way I want to go.
>>



More information about the rules-dev mailing list