Resource resource = root.eResource();
if (resource == null) {
throw new IllegalArgumentException("EObject '" + root + "' has a null resource.");
}
ICreateElementsFactory handler = createCreateElementsFactory();
CreateMissingElementsWithDrools ce = provider.getInferenceEngine(handler, false, reloader);
ce.create(root, logRuleSource, createMonitor());
// write out this inferred model for reference
inferredModel = provider.saveInferredModel(resource);