[
https://jira.jboss.org/jira/browse/JBRULES-1812?page=com.atlassian.jira.p...
]
Karl Schwamb commented on JBRULES-1812:
---------------------------------------
Another approach to this feature is as follows:
Associate the rule extension (e.g. the LHS of "test rule 1" in the example) with
a grouping construct such as a category folder in Guvnor or a rule-flow-group in the DRL.
This allows all rules present in the group to implicitly acquire the additional LHS
elements through their presence in the group. Guvnor can display such LHS elements in a
different highlight to indicate the inheritance relationship.
If rules are moved between categories, they implicitly lose LHS elements (from the source
group) and gain LHS elements (from the target group).
One application of this feature would be to add LHS conditions to a hierarchy of category
folders to provide context without having to add navigational conditionals in the rule
flow.
This can be considered a form of situated reasoning where the full meaning of each rule is
a combination of the explicit semantics and the implicit characteristics of the
environment.
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.CR1
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