Hi All,
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).
KieServices kieServices = KieServices.Factory.get();
KieContainer kContainer = kieServices.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("foo-company");
Since ~90% of the rules is the same, I'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.
Say I define a set of general rules in rules.common package and rules specific to company Foo (rules.foo) and Bar (rules.bar), is there any way to load and merge the two into a single KieSession? Could I somehow say, "please give me the rules from rules.common and rules.foo"?
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?
Thanks,
Peter
Is there any way to load multiple KieSessions and combine them into one?
For example, if there are companies Foo and Bar, could I
For the application should