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!