<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">You need to specify the packages that the kiebase includes. That way different resources can be assigned to different kiebases<div><div style="border: 1px inset; padding: 2%; position: static; z-index: auto;"><pre style="margin-top: 0px; margin-bottom: 0px; padding: 6px; background-color: rgb(255, 255, 255); font-family: Menlo; position: static; z-index: auto;" bgcolor="#ffffff"><font bgcolor="#e4e4ff"><span style="background-color:#e4e4ff;">KieBaseModel.</span></font>addPackage(java.lang.String s);</pre></div><div><br></div><div>In the xml it’s a comma separated list packages=“"</div><div><br></div><div>Mark<br><div><div>On 22 Feb 2014, at 19:58, lukes &lt;<a href="mailto:mail2lokesh@gmail.com">mail2lokesh@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br> &nbsp;What's the best way to have multiple kieBases dynamically on<br>same/different KieFileSystem. let's say if i have 3 different drl(this can<br>grow dynamically, so don't want to put in kconfig.xml)l files and i want all<br>three of them to reside in different kiebases so that each session(stateful<br>and stateless) created from the kiebase can have it's independent set of<br>rules. Currently i a doing something like below: <br><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.kFileSystem.write("com.sample" + filename + ".drl", content);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.kBuilder = this.kService.newKieBuilder(this.kFileSystem);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.kBuilder.buildAll(); // kieModule is automatically deployed to<br>KieRepository if successfully built.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (this.kBuilder.getResults().hasMessages(Level.ERROR)) {<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw new RuntimeException("Build Errors:\n" +<br>this.kBuilder.getResults().toString());<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.kContainer =<br>this.kService.newKieContainer(this.kRepository.getDefaultReleaseId());<br><br><br>But here, everything goes in to the same knowledgeBase. The actual problems<br>i am trying to solve are below :<br>1) If i'll rebuild 1 kieBuilder and kieContainer, others won't get affected<br>and users can work on them at the same time during runtime. <br>2) For the stateless sessions, there's no getAgendaGroup(name).setFocus(),<br>so it won't have to execute all the rules in the universal kieBase in my<br>case.<br><br>Thanks in advance.<br><br><br><br><br>--<br>View this message in context: <a href="http://drools.46999.n3.nabble.com/Best-way-to-have-multiple-kieBase-dynamically-tp4028247.html">http://drools.46999.n3.nabble.com/Best-way-to-have-multiple-kieBase-dynamically-tp4028247.html</a><br>Sent from the Drools: User forum mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></div></body></html>