I'm not certain that there's official documentation on this, but it looks like 
the feature has existed since 5.0.0: 

https://issues.jboss.org/browse/JBRULES-1812

The associated check-in to add the feature is also here: 

https://github.com/droolsjbpm/drools/commit/9f0498ecaa118cf78a9760ab84056d4435b42d8b

I haven't worked extensively with it, but I believe that the extends keyword 
will join the LHS of the super rule with the LHS of the extended rule, further 
narrowing the criteria. From what I understand of the unit tests, the RHS of 
the child rule only is executed (though the RHS of the parent rule may execute 
anyway assuming the parent rule is enabled).

The unit tests for this feature are available here:

https://github.com/droolsjbpm/drools/blob/9f0498ecaa118cf78a9760ab84056d4435b42d8b/drools-compiler/src/test/java/org/drools/integrationtests/MiscTest.java#L1077

--
Build Smarter Software.

Spantree Technology Group, LLC
813 W Randolph St, Suite 301, Chicago, IL
email: [email protected] (mailto:[email protected]) | phone: 773.359.3865 
(tel:773.359.3865)


On Thursday, September 27, 2012 at 12:02 AM, Ming Fang wrote:

> Where can I find documentation on extending rules using the 'extends' keyword?
> The official documentation doesn't even list that as a keyword.
> I only found out about it by accident here 
> http://blog.athico.com/2012/09/conditional-named-consequences-in.html
> 
> _______________________________________________
> rules-users mailing list
> [email protected] (mailto:[email protected])
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to