New in v4.2.1.7

Version 4.2.1.7 is a minor upgrade with numerous bug fixes and a few new features. The full set of changes can be found in the change log. The sections below provide an overview of the improvements.

  1. A new groovy script was added: iamscripts/user-conversion/UserTypeConversion.groovy. More on user conversion feature can be found in this document.
import org.openiam.esb.core.user.converter.AbstractUserConversion
import org.openiam.exception.BasicDataServiceException
import org.openiam.idm.srvc.user.dto.User
class UserTypeConversionPerformer extends AbstractUserConversion {
/**
available MQ services:
MetadataTypeRabbitMQService metadataTypeRabbitMQService;
UserRabbitMQService userRabbitMQService;
RoleRabbitMQService roleRabbitMQService;
GroupRabbitMQService groupRabbitMQService;
OrganizationRabbitMQService organizationRabbitMQService;
ResourceRabbitMQService resourceRabbitMQService;
and context if you need other bean
/
@Override
void validateUserConversion(final User user, final User sourceUser, final String newTypeId) throws BasicDataServiceException {
// MetadataType type = getMetadataTypeByNameAndGrouping("Default User", MetadataTypeGrouping.USER_OBJECT_TYPE)
/
if (user.getMdTypeId().equalsIgnoreCase("DEFAULT_USER") && "INTERNAL_USER".equals(newTypeId)) {
BasicDataServiceException be = new BasicDataServiceException(ResponseCode.VALIDATION_ERROR);
be.addErrorToken(new EsbErrorToken("openiam.ui.common.field.validation.error"))
throw be
}*/
}
@Override
void convertUserType(User targetUser, User sourceUser, String newMdType) throws BasicDataServiceException {
// MetadataType type = getMetadataTypeByNameAndGrouping("Default User", MetadataTypeGrouping.USER_OBJECT_TYPE)
/if (sourceUser != null) {
if (CollectionUtils.isNotEmpty(sourceUser.getRoles())) {
for (UserToRoleMembershipXref role : sourceUser.getRoles()) {
targetUser.addRole(role.getEntityId())
}
}
} else {
BasicDataServiceException be = new BasicDataServiceException(ResponseCode.USER_CONVERSION_ERROR);
be.addErrorToken(new EsbErrorToken("openiam.ui.selfservice.direct.reports.covert.user.error"))
throw be
}/
}
}
  1. Change done to the following script: /bpm/CustomNotificationDelegate.groovy.
package org.openiam.workflow.activiti.groovy
import org.openiam.idm.srvc.auth.dto.Login
import org.openiam.idm.srvc.user.dto.NewUserProfileRequestModel
import org.openiam.idm.srvc.user.dto.User
class CustomNotificationDelegate extends DefaultNotificationDelegate {
@Override
void sendNotificationUserCentricRequest(User toNotify, User targetUserFromDb, Map<String, Object> executionValues, String processInstanceId) {
super.sendNotificationUserCentricRequest(toNotify, targetUserFromDb, executionValues, processInstanceId)
}
@Override
void sendNotificationUserCentricRequest(User toNotify, User targetUserFromDb, Map<String, Object> executionValues, String notificationType, String processInstanceId) {
super.sendNotificationUserCentricRequest(toNotify, targetUserFromDb, executionValues, notificationType, processInstanceId)
}
@Override
void sendNotification(User toNotify, User targetUser, Map<String, Object> executionValues, String processInstanceId) {
super.sendNotification(toNotify, targetUser, executionValues, processInstanceId)
}
@Override
void sendNotification(User toNotify, User targetUser, Map<String, Object> executionValues, String notificationType, String processInstanceId) {
super.sendNotification(toNotify, targetUser, executionValues, notificationType, processInstanceId)
}
@Override
void sendEmails(Map<String, Object> executionValues, User requestor, User newUser, String notificationType, Set<String> userIds, Set<String> emailAddresses, NewUserProfileRequestModel request) {
super.sendEmails(executionValues, requestor, newUser, notificationType, userIds, emailAddresses, request)
}
@Override
void sendEmail(String notificationType, Map<String, Object> executionValues, User requester, User newUser, String userId, String email, String identity, String password, NewUserProfileRequestModel profileRequestModel) {
super.sendEmail(notificationType, executionValues, requester, newUser, userId, email, identity, password, profileRequestModel)
}
@Override
void sendNotificationRequestNewHire(User user, User requester, Map<String, Object> executionValues, NewUserProfileRequestModel profileModel, String processInstanceId) {
super.sendNotificationRequestNewHire(user, requester, executionValues, profileModel, processInstanceId)
}
@Override
void sendActivationLink(Map<String, Object> executionValues, User user, Login login) {
super.sendActivationLink(executionValues, user, login)
}
}
  1. If you are using AD PowerShell connector update it to version 5.26 (the newest connector version is available in a release).
  2. There is a new url Pattern /selfservice/create-new-group-request added. You need to re-add the default patterns into existing content providers to add the new one.