[rules-users] Using dynamic package names with Drools 6.0 Spring integration.
Sunny Singh
mailtosunny85 at gmail.com
Fri May 2 12:17:24 EDT 2014
Hello,
I am trying to integrate Drools 6.0 with my application using Drools-Spring
integration features.
Issues faced:
I need to define the knowledge bases in a spring context XML and make the
package names to be dynamically passed into the knowledge bases using
Spring Expression Language when the Spring container is created at the
start-up. But, the package names are not being injected into the knowledge
base when it is created by Drools framework.
If I define the package names and hard-code them into the "packages"
property of the kbase tag, it works.
Could you please let me know if there is a way to make the package names
being passed dynamically passed into the "packages" property of the kbase
tag. This is because my client application would supply the packages names
when the knowledge bases are setup and I am trying not to hard-code these.
XML Configuration:
<bean id="packageRepository" class="test.PackageRepository">
<property name="packages" value="packageA,packageB"/>
</bean>
<kie:kmodule id="kmodule">
<kie:kbase name="testKnowledgeBase"
packages="#{packageRepository.packages}"/>
</kie:kmodule>
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/e1e803ba/attachment.html
More information about the rules-users
mailing list