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

Mark Proctor mproctor at codehaus.org
Fri Aug 20 14:30:53 EDT 2010


  On 20/08/2010 17:21, Wolfgang Laun wrote:
> 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.
I want to compltely change agenda-groups, ruleflow-groups, 
activation-groups etc.

In the same way you'll be reluctant to want to use internal methods as 
they will change over time. I'm reluctant to expose internal things that 
I know I want to change in the near term. We have to support those apis 
for 5 years.

Can you caste for now to try and solve your problem? The information is 
there if you caste to org.drools.rule.Rule. We are working on pushing 
more things out of core and compiler over time as we feel confident in 
exposing those things. But it takes time and we are conservative in 
this, as we want to avoid doing anything that makes future changes hard.

Mark
> 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.
>>>
> _______________________________________________
> 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