List<KnowledgeBuilderError> currentErrors = new ArrayList<KnowledgeBuilderError>();
InternalKieModule kieModule = (InternalKieModule) kieBuilder.getKieModuleIgnoringErrors();
for (KieBaseModel kBaseModel : kieModule.getKieModuleModel().getKieBaseModels().values()) {
KnowledgeBuilder kBuilder = kieModule.getKnowledgeBuilderForKieBase( kBaseModel.getName() );
CompositeKnowledgeBuilder ckbuilder = kBuilder.batch();
boolean modified = false;
PackageBuilder pkgBuilder = ((KnowledgeBuilderImpl)kBuilder).getPackageBuilder();
Set<String> wrongResources = resourcesWithErrors.get(kBaseModel.getName());
for ( String resourceName : wrongResources ) {