<div dir="ltr">Hi,<div><br></div><div>We are in the process of upgrading Drools in our application. Until 5.x the following spring configuration used to work well for us:</div><div><br></div><div><div> <font face="courier new, monospace"><drools:kbase id="<b>validationRulesKBase</b>"></font></div>
<div><font face="courier new, monospace"> <drools:resources></font></div><div><font face="courier new, monospace"> <drools:resource type="DRL" source="classpath:rules/trade/rule1.drl" /></font></div>
<div><font face="courier new, monospace"> <drools:resource type="DRL" source="classpath:rules/trade/rule2.drl" /></font></div><div><font face="courier new, monospace"> </drools:resources></font></div>
<div><font face="courier new, monospace"> </drools:kbase></font></div></div><div><br></div><div>With an inejection of this KnowledgeBase, we would create a stateless session and fire all rules after inserting appropriate facts and globals.</div>
<div><br></div><div>After upgrading to Drools 6, our DRL files don't seem to be getting picked up in the knowledge base - we are using the following spring configuration:</div><div><br></div><div><div><font face="courier new, monospace"> <bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor"/></font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> <kie:kmodule id="kieModule"></font></div><div><font face="courier new, monospace"> <kie:kbase name="validationRulesKBase" packages="com.acme.rules"/></font></div>
<div><font face="courier new, monospace"> </kie:kmodule></font></div></div><div><br></div><div>This KnowledgeBase gets injected in our code but it doesn't seem to pick up the DRL files in the specified package. We have ensure that the drl files are under <font face="courier new, monospace">src/main/resources/<b>com/acme/rules </b></font>and that package is specified in each DRL file at the top. </div>
<div><br></div><div>Am I missing something in this new configuration?</div><div><br></div><div>thnx,<br clear="all"><div>-mayank<br></div>
</div></div>