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

Loading multiple sheets of single Excel book by one change-set xml should fail gracefully if multiple sheets use the same RuleTable name

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.5.0.Beta1
    • 5.0.1.FINAL
    • drools-core
    • None

      I'm trying to use rules via DecisionTable using change-set.
      I wrote rules in multiple sheets of single Excel book.
      Then I configured my change-set xml like:

      ...
      <add>
      <resource source='classpath:data/dtable.xls' type="DTABLE">
      <decisiontable-conf input-type="XLS" worksheet-name="sheet1" />
      </resource>
      <resource source='classpath:data/dtable.xls' type="DTABLE">
      <decisiontable-conf input-type="XLS" worksheet-name="sheet2" />
      </resource>
      </add>
      ...

      But only rules of sheet1 were loaded.

      As far as I observed source codes, KnowledgeAgentImpl.java puts resource into "Map<Resource, ResourceMapping> resources". But even if multiple resources are configured in change-set, it appears to me like those resources are considered as the same resource and eventually only one resource will be registered.

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            rhn-support-tkobayas Toshiya Kobayashi
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived: