<div dir="ltr">Hi All,<div><br></div><div>We develop a software used by multiple companies. A small part of the rules is slightly different for every single company. We would like to package all of the rules into the application, so the code should - based on environment information - decide, which ones to load (using KieClasspathContainer).</div>
<div><font face="courier new, monospace"><br></font></div><div><div><font face="courier new, monospace">        KieServices kieServices = KieServices.Factory.get();</font></div><div><font face="courier new, monospace">        KieContainer kContainer = kieServices.getKieClasspathContainer();<br>
</font></div><div><font face="courier new, monospace">        KieSession kSession = kContainer.newKieSession(&quot;foo-company&quot;);</font><br></div></div><div><br></div><div>Since ~90% of the rules is the same, I&#39;m wondering what the best approach could be in this situation: duplicating common rules in every KieSession package seems to be a very bad idea.<br>
</div><div><br></div><div>Say I define a set of general rules in<b> rules.common</b> package and rules specific to company Foo (<b>rules.foo</b>) and Bar (<b>rules.bar</b>), is there any way to load and merge the two into a single KieSession? Could I somehow say, &quot;please give me the rules from rules.common and rules.foo&quot;?</div>
<div><br></div><div>I know that I could use the low level APIs to load rule files individually, but that is something I would like to avoid. Is there any better solution for this?</div><div><br></div><div>Thanks,</div><div>
Peter</div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Is there any way to load multiple KieSessions and combine them into one? <br>
</div><div><br></div><div><br></div><div><br></div><div>For example, if there are companies Foo and Bar, could I </div><div><br></div><div>For the application should </div><div><br></div><div><br></div></div>