[rules-users] Using dynamic package names with Drools 6.0 Spring integration.

Mark Proctor mproctor at codehaus.org
Sun May 4 20:02:43 EDT 2014


I expect this is functionality that would have to be added to our spring implementation. An ideal task for someone wanting to contribute to the project:
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark

On 2 May 2014, at 17:17, Sunny Singh <mailtosunny85 at gmail.com> wrote:

> 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!
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140505/0dacf852/attachment.html 


More information about the rules-users mailing list