At present I set up a ksession like this:

KnowledgeBase kbase = < call method that loads several rule files and process flow files via kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()) >

StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

Then I set globals, start one of the processes, assert facts, fire rules etc etc

Later on rules fire that start some or all of the remaining pre-loaded processes, as required

Is the best way to do it? Instead should I be loading additional rule and/or process files in to the ksession on the fly, rather than at the beginning, for performance/scalability reasons? (I couldn't work out how to do this without overwriting ksession).

Thanks in anticipation,

John Shepherdson