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

Spring "Drools Resources" Need to be Modular

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

XMLWordPrintable

    • Medium

      When development is done by multiple teams, there should be a way to reference the resources in a modular way.

      Here is how it is / can be done now ( which is BAD / not modular ):

      <drools:kbase id="kbase">
      <drools:resources>
      <drools:resource type="DRF" source="classpath:org/drools/container/spring/team1_1.drf"/>
      <drools:resource type="DRF" source="classpath:org/drools/container/spring/team1_2.drf"/>
      <drools:resource type="DRF" source="classpath:org/drools/container/spring/team2_1.drf"/>
      <drools:resource type="DRF" source="classpath:org/drools/container/spring/team2_2.drf"/>
      <drools:resource ref="team3_1"/>
      <drools:resource ref="team3_2"/>
      </drools:resources>
      </drools:kbase>

      Since clients need to be aware of every little artifact of individual team, and have to reimport all artifacts into a knowledge base one by one.

      Here is a better way to do it:

      <drools:kbase id="kbase">
      <drools:resources ref="team1-resources"/>
      <drools:resources ref="team2-resources"/>
      <drools:resources ref="team3-resources"/>
      </drools:kbase>

      where individual team's config may look as:

      (e.g. team 1):

      <drools:resources id="team1-resources">
      <drools:resource type="DRF" source="classpath:org/drools/container/spring/team1_1.drf"/>
      <drools:resource type="DRF" source="classpath:org/drools/container/spring/team1_2.drf"/>
      </drools:resources/>

      ------------------------------------------------------------------------------

      Long story short:

      "drools:resources" needs:

      1. ID, to be able to ref to it
      2. REF, to be able to ref to an ID

      "drools:kbase" needs:

      1. To optionally take a list of "drools:resources"

      Thank you,
      /Anatoly

              salaboy@gmail.com Mauricio Salatino (Inactive)
              Anat0ly Anatoly Polinsky (Inactive)
              Archiver:
              rhn-support-ceverson Clark Everson

                Created:
                Updated:
                Archived:

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified