String packageName = processInfo.getProcess().getPackageName();
Package pkg = ruleSet.getPackage(packageName);
if (pkg == null) {
pkg = DroolsModelBuilder.addPackage(ruleSet, packageName, 0, 0);
}
Process process = DroolsModelBuilder.addProcess(pkg, processInfo.getProcess().getId(), file);
List<DroolsElement> droolsElements = resourcesMap.get(file);
if (droolsElements == null) {
droolsElements = new ArrayList<DroolsElement>();
resourcesMap.put(file, droolsElements);
}