[JBoss JIRA] Created: (JBRULES-1812) Add rule inheritance to Core DRL support
by Michael Rhoden (JIRA)
Add rule inheritance to Core DRL support
----------------------------------------
Key: JBRULES-1812
URL: https://jira.jboss.org/jira/browse/JBRULES-1812
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 5.0.0.M2
Reporter: Michael Rhoden
Assignee: Mark Proctor
Fix For: 5.0.0.M3
added "Extends" keyword to DRL grammar. When a rule extends another, it will pull the entire LHS from its parent, to the current rule before execution. An example:
rule "test rule 1"
enabled false
when
c: Cheese( type == "stilton" )
then
list.add( new String ("rule 1") );
end
rule "test rule 2" extends "test rule 1"
enabled false
when
Cheese( price <= 6.00) from c
then
list.add( new String ("rule 2") );
end
rule "test rule 3" extends "test rule 2"
when
Cheese( price > 1.00 ) from c
then
list.add( new String ("rule 3") );
end
Test is in MiscTest.java
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months