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.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.
Oracle Access Management Online Training
ReplyDeletehttp://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
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