Friday, March 1, 2019

Schedulers in OIM


The second article on the plug-in points will be based on schedulers.
The relevant plugin point for the same is  : oracle.iam.scheduler.vo.TaskSupport

Oracle Identity Manager provides the capability of creating your own scheduled tasks. We can create scheduled tasks according to your requirements if none of the predefined scheduled tasks fit your needs.

OIM exposes scheduler APIs to perform long running tasks which may include huge data exchange, data processing which can be triggered periodically or on demand without any code changes.

one quick point here will be , we can start or stop the entire scheduler services from the below portal -
http://OIM_HOST:OIM_PORT/SchedulerService-web/status

There are three part of developing a custom scheduler  :

  • Creating / Importing the Scheduled Task definition XML File
  • Developing the Scheduled Task Class
  • Configuring the Plug-in XML File


Creating / Importing the Scheduled Task definition XML File :

Configuring the scheduled task XML file involves updating the XML file that contains the definitions of custom scheduled tasks.

This file name must be the same as the scheduled task name, with the .xml extension. We must import the custom scheduled task file to the /db namespace of Oracle Identity Manager MDS schema.

XML Name space is very important when we're deploying custom scheduler task in MDS Schema. If we give wrong name space in scheduledTasks tag and it will deploy in the OIM MDS Schema But OIM won't recognised as a ScheuledTask.

We can import this metadata through "weblogicImportmetada.sh" script , make sure our "weblogic.properties" file under OIM_HOME/bin directory has the "metadata_from_loc" property updated with the current location for

The way I like to do it though, is from taking an export of any of the existing tasks (without the job jar file), and changing the parameters accordingly, and re-importing it through deployment manager -


Configuring the Plug-in XML File : 


just like any other plugins in OIM, we need a plug-in file to register the scheduler.


Developing the Scheduled Task Class : 


We'll read the user's AD account UIds from the input parameter defined in the scheduler definition metadata, split them by ',' and provision OUD account to each of them. Point to be noted - we're only passing the Container DN for the OUD account here, rest of all the attributes will be filled by pre-populate adapters mapped in the process form.

The basic will be to extend the 'TaskSupport' class, and to override the method  'execute' -


At the end  -
I'll like to encourage you to go through the below Oracle guides for a deeper understanding -

OIM admin guide  -  https://docs.oracle.com/cd/E37115_01/admin.1112/e27149/scheduler.htm#OMADM738 
OIM developer guide  - https://docs.oracle.com/cd/E37115_01/dev.1112/e27150/refsched.htm#OMDEV231

No comments:

Post a Comment