2 Replies Latest reply: Jan 28, 2013 7:36 PM by idamGod RSS

    OIM 11g custom scheduler

    969192
      Hi,

      I have to write a scheduler to push data from HR target resource to OIM database in OIM 11gR2.

      Please let me know the basic steps to write and deploy the scheduler.

      Thanks!
        • 1. Re: OIM 11g custom scheduler
          Durgaprasad
          Step 1

          Develop the code for scheduler

          Write your java logic inside a class extending oracle.iam.scheduler.vo.TaskSupport

          public class X extends oracle.iam.scheduler.vo.TaskSupport{

          public void execute(HashMap hashMap) {

          // Logic to get the scheduled task attributes and general code logic comes here

          }

          public HashMap getAttributes() {
          return null;
          }
          public void setAttributes() {
          }


          }

          Step 2

          Configuring the scheduled task xml file

          You can modify the task.xml file located in the /db namespace of Oracle Identity Manager MDS schema, or you can create a custom scheduled task file. If you create a custom file, then the file name must be the same as the scheduled task name, with the .xml extension. You must import the custom scheduled task file to the /db namespace of Oracle Identity Manager MDS schema

          Example file
          Content:
          <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
          <task>
          <name>Name of the scheduled task</name>
          <class>PackageName.ClassName</class>
          <description>Description of the schedule task</description>
          <retry></retry>
          <parameters>
          </parameters>
          </task>
          </scheduledTasks>

          Step 3

          Importing the schedule task xml file into MDS

          Place the xml file into a folder with structure like tmp/db/scheduletask.xml (substitute the name of your xml file here)
          update weblogic.properties file present in OIM_HOME/server/bin with the following entries
          •     wls_servername=oim_server1
          •     application_name=OIMMetadata
          •     metadata_from_loc=(Mention the location where xml file is placed until tmp folder)
          Now ensure all environment variables like OIM_ORACLE_HOME, WL_HOME, MW_HOME are set.
               Go to <OIM_HOME>/server/bin and run below command
          weblogicImportMetadata.bat
          username: weblogic
          password: Admin/weblogic console password
          url: t3://<Admin server Hostname or IP>:<Admin/weblogic port>

          Restart OIM Managed Server.

          Step 4

          Put the jar file containing the code developed in step 1 into OIM server

          use the UploadJars.bat tool present in OIM_HOME\server\bin folder

          Now jar is uploaded successfully into OIM db. If you need to delete it use DeleteJars.bat or DeleteJars.sh available in the same path. For testing purpose place the jar directly into Schedule task folder instead of using this utility.

          Step 5

          Final step is to create a new task in sysadmin console

          Search and select the name of the task and give the necessary parameters.

          Thats it. test and see if everything works
          • 2. Re: OIM 11g custom scheduler
            idamGod
            Refer this for detailed steps.

            http://srini-bellamkonda.blogspot.com/2012/12/developing-custom-schedule-task-in-oim.html