In the event handlers, we can get the user key using by the below ways:
- orchestration.getTarget().getEntityId()
- public long getUserKey(String userLogin) throws NoSuchUserException, UserLookupException, SearchKeyNotUniqueException, AccessDeniedException {
long usrKey=0;
UserManager usrService= oimClient.getService(UserManager.class);
User user = usrService.getDetails("User Login", userLogin, null);
HashMap mapAttrs = user.getAttributes();
usrKey= (Long) mapAttrs.get("usr_key");
System.out.println("key is is :" + usrKey);
return usrKey;
}