Google Search

Monday, July 27, 2015

How to Create Custom Scheduler Job in OIM 11g R2 PS2


Below are the high level steps to create a custom scheduler job in OIM:

      1.       Prepare a custom java code which extends TaskSupport
     2.       Make a Jar file
     3.       Prepare plugin.xml file
 
                          <?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="com.test.iam.tasks. TestScheduledTask " version="1.0" name=" TestScheduledTask"/>

    </plugins>

</oimplugins>
      4.       Prepare <Classname>.xml file (Prepared as per your requirement)

                          <?xml version="1.0" encoding="UTF-8"?>

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

  <task>

    <name>Test Scheduled Task</name>

    <class> com.test.iam.tasks.TestScheduledTask</class>

    <description> Test Scheduled Task </description>

    <retry>1</retry>

    <parameters>

                                <string-param required="true" helpText="Input File"> Input File</string-param>

                                <string-param required="true" helpText="Delimeter">Delimeter</string-param>

   </parameters>

  </task>

</scheduledTasks>

       5.       Structure of this schedule task zip file :

                               a.       Lib/<classname.jar file>

                               b.      Plugin.xml

                              c.       META-INF/<classname.xml file>

                              d.      Create a <classname.zip> file

       6.       Move the created zip file into OIM server path ($OIM_HOME/Server/plugins)
      7.       Do Plugin Registration using “ant” utility (make sure you have set ant.properties file properly)
 
     8.       Verify plugin is successfully updated or not in OIM DB

                    Select * from plugins where NAME=’complete package name with class’;

    9.       Create a custom schedule task in OIM by login into OIM system administration console
 


     10. Go to Scheduler under System Management
 
 
 
  11.       Click on Create new as shown below

 

  
   12.       Provide required details and select Task (which will be available with name provided inside scheduler xml file)
 

   13.       It will be shown up in Scheduled Tasks and Run that job.

No comments:

Post a Comment