Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1812

Add rule inheritance to Core DRL support

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.CR1
    • 5.0.0.M2
    • None
    • None

      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

            mproctor@redhat.com Mark Proctor
            mrhoden-famc Michael Rhoden (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived: