You need to specify the packages that the kiebase includes. That way different resources can be assigned to different kiebases KieBaseModel.addPackage(java.lang.String s);
In the xml it’s a comma separated list packages=“" Mark On 22 Feb 2014, at 19:58, lukes <mail2lok...@gmail.com> wrote: > Hi, > > What's the best way to have multiple kieBases dynamically on > same/different KieFileSystem. let's say if i have 3 different drl(this can > grow dynamically, so don't want to put in kconfig.xml)l files and i want all > three of them to reside in different kiebases so that each session(stateful > and stateless) created from the kiebase can have it's independent set of > rules. Currently i a doing something like below: > > this.kFileSystem.write("com.sample" + filename + ".drl", content); > this.kBuilder = this.kService.newKieBuilder(this.kFileSystem); > this.kBuilder.buildAll(); // kieModule is automatically deployed to > KieRepository if successfully built. > if (this.kBuilder.getResults().hasMessages(Level.ERROR)) { > throw new RuntimeException("Build Errors:\n" + > this.kBuilder.getResults().toString()); > } > this.kContainer = > this.kService.newKieContainer(this.kRepository.getDefaultReleaseId()); > > > But here, everything goes in to the same knowledgeBase. The actual problems > i am trying to solve are below : > 1) If i'll rebuild 1 kieBuilder and kieContainer, others won't get affected > and users can work on them at the same time during runtime. > 2) For the stateless sessions, there's no getAgendaGroup(name).setFocus(), > so it won't have to execute all the rules in the universal kieBase in my > case. > > Thanks in advance. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Best-way-to-have-multiple-kieBase-dynamically-tp4028247.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users