Friday, 27 July 2018

Sending Notification to end user if the user gets locked in OIM

I created a post-process event handler for LOCK operation with Bulk operation method
Note* As per Oracle documentation for Lock and Unlock operations only bulk method works (for both bulk & non-bulk cases)

public BulkEventResult execute(long processId, long eventId, BulkOrchestration orchestration){
     
         HashMap<String, Serializable>[] orchParamArray = orchestration.getBulkParameters();
         String[] entityIds = orchestration.getTarget().getAllEntityId();
         int numUsers = entityIds.length;
         String userKey="",un="";
         dbbb gtn= new dbbb();
         gtn.connect2();
         for(int i = 0; i < numUsers; i++)
                         {
                             // Get USR_KEY of current user
                             userKey = entityIds[i];
                             un=gtn.getOIMUserInfo(userKey);
                             //Call the notification service here
                         }
         gtn.close();
         return new BulkEventResult();
}

Create a Plugin.xml

Create EventHandler.xml with operation="LOCK"

Put the EventHandler.xml in META-INF directory

Deploy the plugin!


No comments:

Post a Comment