[Oracle Identity Manager] Send Notificiation With OIM Api

Oracle Identity Manager notifications used to send information after user create,password reset or your custom operation.

In some case, you need a custom notificaion process such as you can send notification after Active Directory Create User. I want to explain how you can send a notification any time with oim api.

1-) Create a notification template from Oracle Identity Manager.

2-) Develop send notification adapter code. (Add your classpath: oimclient.jar)

  private NotificationService notificationService;

  public NotificationService getNotificationService()
  {
    if (this.notificationService == null) {
      this.notificationService = ((NotificationService)Platform.getService(NotificationService.class));
    }
    return this.notificationService;
  }

  public void sendNotification(String receiverUserId, String templateName, HashMap<String, Object> templateParams)
    throws EventException, UnresolvedNotificationDataException, TemplateNotFoundException, MultipleTemplateException, NotificationResolverNotFoundException, UserDetailsNotFoundException, NotificationException
  {

    NotificationEvent event = new NotificationEvent();
    event.setUserIds(receiverUserId); // set OIM User Login parameter
    event.setTemplateName(templateName); // set OIM Notification template name. 
    event.setSender(null); 

    event.setParams(templateParams); // it's used for set some parameters in template.

    getNotificationService().notify(event); // send notification
  }

Template params use for send some dynamic variable in notificiation template. if you want to send information such as user login,password etc in notification, first you have to add variable with "$" character in notification template ($userLoginId) then set this variable with a HashMap in code.

3-) Create a process task adapter from design console and assign it after "AD User" Process Form, "Create User" task ,"SUCCESS" response.
Comments:

Hi,
Notification Service accepts only userid as a sender. What If we want to send e-mail to DL or e-mail for which user doesnt exist in OIM. Is there any way we can use this Notification Service for this scenario ?

Thanks

Posted by guest on January 08, 2014 at 11:16 AM EET #

You can send notification only a OIM User with API.You may create a dummy user who has your DL e-mail address and notify to him.

Regards.

Posted by guest on January 08, 2014 at 11:31 AM EET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Türkçe versiyon için tıklayınız.

profile image
Welcome to my blog, a space for me to share information on various Oracle middleware technology issues. My day job as a consultant within Oracle Consulting Fusion Middleware Team.I will share some of these issues and solutions here in the hope that it will help you out some day!


Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today