// if we get to here, then we know the pkgs is now cached
pkgs = kModule.getKnowledgePackageCache().get( kBaseModel.getName() );
InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase( getKnowledgeBaseConfiguration(kBaseModel, cl) );
kBase.addKnowledgePackages( pkgs );
return kBase;
}
private static KieBaseConfiguration getKnowledgeBaseConfiguration(KieBaseModelImpl kBaseModel, ClassLoader cl) {
KieBaseConfiguration kbConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null, cl);