[rules-users] documentation on rule extends keyword

Cedric Hurst cedric at spantree.net
Thu Sep 27 01:36:18 EDT 2012


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: cedric at spantree.net (mailto:cedric at spantree.net) | 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
> rules-users at lists.jboss.org (mailto: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/20120927/5edf615a/attachment.html 


More information about the rules-users mailing list