addKieBaseModels(beanFactory, kieModuleModel);
return kieModuleModel;
}
private void addKieBaseModels(ConfigurableListableBeanFactory beanFactory, KieModuleModelImpl kieModuleModel) {
BeanExpressionContext context = new BeanExpressionContext(beanFactory, null);
for (String beanDef : beanFactory.getBeanDefinitionNames()){
BeanDefinition beanDefinition = beanFactory.getBeanDefinition(beanDef);
if ( beanDefinition.getBeanClassName() != null && beanDefinition.getBeanClassName().equalsIgnoreCase(KBaseFactoryBean.class.getName())){
KieBaseModelImpl kBase = new KieBaseModelImpl();
kBase.setKModule(kieModuleModel);