if (ruleDMO.getAllowedTypeSize() > 0){
boolean typeOkay = false;
Iterator<TypeDefinitionREF> types = ruleDMO.getAllowedType();
while(types.hasNext()){
TypeDefinitionREF type = types.next();
if (type.getObjectName().getNameString().equals(ai.type)){
typeOkay = true;
break;
}
}