Skip to main content

Developing Scheduler with OIM 11g R2-

1.     Scheduler in OIM uses oracle.iam.scheduler.vo.TaskSupport plugin point.

2.     Write the Java code extending oracle.iam.scheduler.vo.TaskSupport.
            Code Snippet:-
package com.oracle.oim.scheduler;


import oracle.iam.platform.Platform;
import oracle.iam.provisioning.api.ApplicationInstanceService;
import oracle.iam.provisioning.vo.Account;
import oracle.iam.provisioning.vo.AccountData;
import oracle.iam.provisioning.vo.ApplicationInstance;
import oracle.iam.provisioning.vo.FormInfo;
import oracle.iam.scheduler.vo.ITResource;
import oracle.iam.scheduler.vo.ITResourceParameter;

import com.thortech.xl.dataaccess.tcDataProvider;
import Thor.API.Operations.tcITResourceInstanceOperationsIntf;
import Thor.API.Operations.tcLookupOperationsIntf;
import Thor.API.tcResultSet;
import Thor.API.tcUtilityFactory;
import oracle.iam.connectors.icfcommon.service.ProvisioningService;
import oracle.iam.identity.rolemgmt.api.RoleManager;
import oracle.iam.identity.rolemgmt.api.RoleManagerConstants;
import oracle.iam.identity.rolemgmt.vo.Role;
import oracle.iam.identity.usermgmt.api.UserManagerConstants;
import oracle.iam.identity.usermgmt.vo.User;
public class CustomDBScheduler extends oracle.iam.scheduler.vo.TaskSupport {
       private static final Logger LOGGER = Logger.getLogger(CustomDBScheduler.class.getName());
      
      
      

       public CustomDBScheduler(){
             debugLogger("CustomDBScheduler :: execute :: Instantiated ..");      
       }
       @Override
       public void execute(HashMap attr) throws Exception {
             // TODO Auto-generated method stub
             debugLogger("CustomDBScheduler :: execute :: Execute Method Started ..");
            
            
             try
             {
                    if (attr!=null)
                    {

                           debugLogger("CustomDBScheduler :: execute :: Execute method ...");
                           itResource=(String) attr.get("IT Resource");
                           debugLogger("CustomDBScheduler :: execute :: IT Resource Value is "+itResource);
                           if (itResource == null || itResource.equals(""))
                           {
                                 debugLogger("CustomDBScheduler :: execute :: IT Resource Value is Empty");
                                 return;
                           }
                           role=(String) attr.get("Role");
                           debugLogger("CustomDBScheduler :: execute :: role Value is "+role);
                           if (role == null || role.equals(""))
                           {
                                 debugLogger("CustomDBScheduler :: execute :: role Value is Empty");
                                 return;
                           }
                           appIns=(String) attr.get("App Instance");
                           debugLogger("CustomDBScheduler :: execute :: appIns Value is "+appIns);
                           if (appIns == null || appIns.equals(""))
                           {
                                 debugLogger("CustomDBScheduler :: execute :: appIns Value is Empty");
                                 return;
                           }
                           lookupName=(String) attr.get("Lookup Name");
                           debugLogger("CustomDBScheduler :: execute :: lookupName Value is "+lookupName);
                           if (lookupName == null || lookupName.equals(""))
                           {
                                 debugLogger("CustomDBScheduler :: execute :: lookupName Value is Empty");
                                 return;
                           }
                           itResMap.put("IT Resources.Name", itResource);
                          
       // Write Logic Here …..                

                    }

             }
             catch (Exception e){
                    errorLogger("CustomDBScheduler :: execute :: Exception is "+e.getMessage(),e);
                    e.printStackTrace();
             }
             finally
             {
                   
             }
       }

       @Override
       public HashMap getAttributes() {
             // TODO Auto-generated method stub
             return null;
       }

       @Override
       public void setAttributes() {
             // TODO Auto-generated method stub

       }
3.     Prepare the plugin.xml as below:
<?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.oracle.oim.scheduler.CustomDBScheduler" version="1.0.1" name="CustomDBScheduler">
</plugin>
</plugins>
</oimplugins>

4.     Jar the class file and put it in a lib folder.
5.     Put the Plugin.xml and lib folder in a structure as below:
<Scheduler.zip>
Plugin.xml                   lib
                           <Scheduler.jar>
6.     Zip the folder and After the zip is prepared put it into <Middleware_home>/Oracle_IDM/server/plugins  folder.

7.     Go to <Middleware_home>/Oracle_IDM/server/plugin_utility folder and change the ant.properties file.

8.     Update the wls.home, oim.home, login.config and mw.home with proper details.

9.     Run the ant -f pluginregistration.xml register command to register the plugin.

10.     Prepare the Scheduler.xml file as below:
<?xml version="1.0" encoding="UTF-8"?>
<scheduledTasks  xmlns="http://xmlns.oracle.com/oim/scheduler">
  <task>
    <name>CustomDBScheduler</name>
    <class>com.oracle.oim.scheduler.CustomDBScheduler</class>
    <description>OIM Sample Scheduled Task</description>
    <retry>5</retry>
      <parameters>
            <string-param required="true" helpText="Name of the IT Resource">IT Resource</string-param>
            <string-param required="true" encrypted="false" helpText="Name of the Role">Role</string-param>
            <string-param required="true" helpText="Name of App Instance">App Instance</string-param>
            <string-param required="true" helpText="Name of Lookup Name">Lookup Name</string-param>
        </parameters>
  </task>
</scheduledTasks>

11.     All the parameters have to be taken from scheduler need to be mentioned within <parameter> tag.

12.     After xml is prepared import the xml into metadata either through EM or wlst. Name of the xml should be same as the name of scheduler. Make sure xml is inside db folder.

13.     After It is imported in MDS login to sysadmin console and click scheduler.

14.     Create a new scheduler and from the task list select the scheduler just imported. Provide the values required and run the scheduler.

Comments

  1. Oracle Access Management Online Training
    http://www.21cssindia.com/courses/oracleaccessmanagement-online-training-5.html
    Introduction to Identity and Access Management Systems
    Introduction to Oracle Access Manager
    Installing Oracle Access Manager Identity System
    Configuring Identity System Object Classes
    Creating Derived Attributes
    Configuring Tabs, Profile Pages, and Panels
    Configuring Access Controls in Identity System
    Access System Configuration
    Configuring Policy Domains and Policies
    Configuring User Authorization
    Managing Access Servers
    Configuring Single Sign-On and Integrating with Oracle WL Single Sign-On
    If you are seeking training and support you can reach me on 91-9000444287

    ReplyDelete
  2. Oracle Access Management Online Training, ONLINE TRAINING – IT SUPPORT – CORPORATE TRAINING http://www.21cssindia.com/courses/oracleaccessmanagement-online-training-5.html The 21st Century Software Solutions of India offers one of the Largest conglomerations of Software Training, If you’re serious about a career in IT, 21st Century would like to provide you a guidance don’t hesitate to organize a free demo session. For any further information regarding the courses once go through our website Visit: http://www.21cssindia.com | Call Us +917386622889 - +919000444287 - contact@21cssindia.com

    ReplyDelete

Post a Comment

Popular posts from this blog

Adding UDF (User Defined Field) on create user page OIM 11g R2 PS1:-

    Login to Sysadmin console and create a Sandbox and activate it. Click on Form Designer and search for user form. 2.      Create a new field of desired type. 3.      Provide the Required Values for UDF creation and click save and close. UDF field will be added then publish the sand box. 4.      Login to Identity console now and create another sandbox and activate it. After sandbox is activated click on users link and the click on create user. 5.      Provide the mandatory values on the form and then click the customize button on top. Select source from the view. 6.      Select the panel where the field has to be added. Select panel form lay out click add content. Select Data component Catalog from the box. 7.      Select UserVO from the bottom. ...

OIM Tuning

Application Module tuning is a critical setting which will affect the UI performance. Following are the recommended application module settings for OIM and these are already set out-of-box (OOB) in later releases of OIM 11g R2. Ensure that these settings are implemented as recommended in your environment. -Djbo.ampool.doampooling=true -Djbo.ampool.minavailablesize=1 -Djbo.ampool.maxavailablesize=120 -Djbo.recyclethreshold=60 - Djbo.ampool.timetolive=-1 -Djbo.load.components.lazily=true - Djbo.doconnectionpooling=true -Djbo.txn.disconnect_level=1 - Djbo.connectfailover=false -Djbo.max.cursors=5 - Doracle.jdbc.implicitStatementCacheSize=5 - Doracle.jdbc.maxCachedBufferSize=19 open DOMAIN_HOME/bin/setDomainEnv.sh file for the WebLogic Server instance.find these lines: JAVA_OPTIONS="${JAVA_OPTIONS}" export JAVA_OPTIONS and change it to: JAVA_OPTIONS="-Djbo.ampool.doampooling=true -Djbo.ampool.minavailablesize=1 -Djbo.ampool.maxavailablesize=120 -D...

OIM Reports : PS3

Oracle Business Intelligence Publisher is Oracle's primary reporting tool for authoring, manag-ing, and delivering all your highly formatted reports. BI Publisher is shipped with Oracle Identity Manager 11g Release 2 PS3. BI Publisher is deployed and configured as a separate managed server within the same Oracle Identity Manager domain. You have the choice of either leveraging the embedded BI Publisher or a standalone BI Publisher. It is recommended that you use the embedded BI Publisher if there are no other reporting requirements and you only need reporting for Oracle Identity Manager. After BI Publisher configuration, you can take advantage of the standard features of BI Publisher, such as:  Access Policy Reports  Request and Approval Reports  Password Reports  Resource and Entitlement Reports  User Reports  Certification Reports  Identity Audit Reports  Exception Reports The Screenshot of all the reports can be seen below: Every Report uses a Da...