[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 #

Hi Mustafa, we are trying to follow this guide but we have a doubt with first step (1-) Create a notification template from Oracle Identity Manager.). This notification template must be created from "Email Definition" in Process Management in design console?

Thanks in advance

Regards,

Guido

Posted by guest on May 09, 2014 at 10:04 PM EEST #

Hi Guido,
You can create notification template from Oracle Identity Manager Sysadmin "Notification" page.

Posted by Mustafa Kaya on May 09, 2014 at 11:52 PM EEST #

You mention adding the oimclient.jar file to your classpath. If I will be sending the new notification from a custom managed bean created in OIM 11g R2, how do I add oimclient.jar to my classpath? Does it need to be added to a lib folder in the oracle.iam.ui.custom-dev-starter-pack.war file, or someplace else?

Thanks,

Frank

Posted by guest on July 31, 2014 at 08:19 PM EEST #

Thanks for this blog...it was really helpful and it worked very much as expected for me.

Regards,
Nitin Natekar

Posted by Nitin Natekar on November 19, 2014 at 11:25 PM EET #

Hi Mustafa,

Thanks a lot for the blog.

We usually get requests from customers asking us to change the notification templates. As of now we are making changes via oim console. Is there any api which takes in the template that we pass and sets it to a specified notification.

Regards,
Varma

Posted by Varma on January 22, 2015 at 07:35 AM EET #

Hi Mustafa,

While creation of Notification template, we need to specify event. Is it necessary to create a custom event and new notification resolver? Or can we use any of the existing events and trigger it whenever we want from our code?

Posted by Prashant on August 13, 2015 at 11:33 PM EEST #

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
« February 2016
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
     
       
Today