How to Register A Custom Scheduled Job or Plugin in Oracle Identity Manager (OIM)

Jimmy LutzIdentity & Access Management, Oracle, Technical TipsLeave a Comment

There are multiple scenarios where we may have to develop a custom scheduled job to perform tasks to meet client requirements. Once the expected job functionality is developed, below are the steps to register the expected job/plugin in OIM so that it can be used.

  1. Create the folder structure as follows.

                lib

                META-INF

                Plugin.xml

The “lib” folder would have the jar file of the functionality that has been developed along with the dependent jar files.

The “META-INF” folder should have the scheduledtask.xml file, which should hold the below content. The text displayed in RED needs to be changed as per the custom design.

        <?xml version=”1.0″ encoding=”UTF-8″?>

        <scheduledTasks xmlns=”http://xmlns.oracle.com/oim/scheduler”>

            <task>

                <name>NAME OF THE SCHEDULED JOB</name>

                <class>CLASS NAME DEFINED ALONG WITH THE PACKAGE</class>

                <description>”DESCRIPTION OF THE CUSTOM SCHEDULED JOB”</description>

                <retry>5</retry>

                <parameters>

        <SET OF PARAMETERS AS PER THE SCHEDULED JOB NEED>

                </parameters>

            </task>

        </scheduledTasks>

 

The below is the plugin.xml file; the text displayed in RED needs to be changed as per the custom design.

        <?xml version=”1.0″ encoding=”UTF-8″?>

        <oimplugins xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>

        <plugins pluginpoint=”oracle.iam.scheduler.vo.TaskSupport”>

        <plugin pluginclass=” CLASS NAME DEFINED ALONG WITH THE PACKAGE” version=”1.0″ name=” NAME OF THE SCHEDULED JOB “/>

        </plugins>

        </oimplugins>

 

Once the above folder structure is created, zip them (e.g., sample.zip) and place them at the below location in OIM Server.

        $OIM_HOME/Server/plugins

 

The below are the steps to register the plugin in OIM.

  1. Set the below environment variables

                APP_SERVER=weblogic

                OIM_ORACLE_HOME

                JAVA_HOME

                WL_HOME

                DOMAIN_HOME

                ANT_HOME

                PATH=$ANT_HOME/bin:$PATH

    2. Navigate to $OIM_HOME/server/plugin_utility

    3. Run the below command

                ant -f pluginregistration.xml  register

 

Provide the below information when prompted.

        OIM Admin user account: xelsysadm

        OIM Admin user account password: ***********

        OIM Managed  server Listen address with OM PORT: t3://<OIM_HOST>:<OIM_PORT>

Provide the location of the zip file 

        $OIM_HOME /server/plugins/sample.zip

On successful registration, log in to the sysadmin console and create the Scheduled Job.

After creating the scheduled job, if you cannot find the scheduled task to select, you need to upload the “scheduledtask.xml” file into MDS manually. You can refer to the other blog (HOW TO IMPORT THE FILE INTO OIM METADATA OR MDS) for this activity

Leave a Reply

Your email address will not be published. Required fields are marked *