if (permission == null) {
throw new InconsistentModelException("Inconsistent model. Permission " + instance.getPermissionId() //$NON-NLS-1$
+ " is not found. It can be caused by model upgrade on the server. Restart application to load new model."); //$NON-NLS-1$
}
final EReference permissionRef = EMFUtil.getPermission(role, permission);
final EObject permissionInstance = securityFactory.create(permission);
roInstance.eSet(permissionRef, permissionInstance);
final Set<IPermissionParameter> parameters = instance.getPermissionParameters();
for (final IPermissionParameter parameter : parameters) {
final EAttribute attr = findAttribute(permission, parameter.getAttributeName());
if (attr == null) {