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

Open Decision Table API to allow custom RuleSheetListeners

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

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 3.0.5
    • None
    • drools-decisiontables
    • None

    Description

      I have a need for a different format for my decision tables - basically instead of the current format with one row per rule with conditions across the top I need to support a matrix-like structure where both the horizontal and the vertical axes represent conditions and the intersection represents the action. In order to do this I created my own MatrixRuleSheetListener inheriting from RuleSheetListener and overriding certain methods. This all works fine however I had to hack the drools code a little to allow me to do it. I was wondering if it would be possible to open up the API to allow this.

      Specifically:

      1. add method to org.drools.decisiontable.parser.RuleSheetListener
      protected void addRule(Rule rule)

      { this._ruleList.add(rule); }

      2. add empty protected methods preInitRuleTable(row, column, value) and postInitRuleTable(row, column, value, rule) to org.drools.decisiontable.parser.RuleSheetListener which are called from the start and end of the initRuleTable method.
      3. Add agendaGroup property to org.drools.decisiontable.model.Rule
      4. Add a new method compile(InputStream, InputType, RuleSheetListener) to org.drools.decisiontable.SpreadsheetCompiler

      I have attached these changes to this request.

      Steve

      Attachments

        1. Rule.java
          8 kB
        2. RuleSheetListener.java
          21 kB
        3. SpreadsheetCompiler.java
          5 kB

        Activity

          People

            mproctor@redhat.com Mark Proctor
            stevearoonie stevearoonie (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty