[
https://issues.jboss.org/browse/JBRULES-2695?page=com.atlassian.jira.plug...
]
Mark Proctor updated JBRULES-2695:
----------------------------------
Assignee: Mauricio Salatino (was: Mark Proctor)
Fix Version/s: 5.2.0.CR1
salaboy: I'm pretty sure this is how the spring xml already works, please close the
jira after you have verified. If it is missing then please retarget to 5.3.
Spring "Drools Resources" Need to be Modular
--------------------------------------------
Key: JBRULES-2695
URL:
https://issues.jboss.org/browse/JBRULES-2695
Project: Drools
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: All
Affects Versions: 5.1.1.FINAL
Environment: N/A
Reporter: Anatoly Polinsky
Assignee: Mauricio Salatino
Labels: drools_spring, spring
Fix For: 5.2.0.CR1
Original Estimate: 1 day
Remaining Estimate: 1 day
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
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira