Creating an entitlement using OIM API - what is lookupkey for?

Hi
I am trying this code
ApplicationInstanceService appService = oimClient.getService(ApplicationInstanceService.class);
ApplicationInstance appInstance = appService.findApplicationInstanceByName("MyAppInstance");
EntitlementService entSvc = oimClient.getService(EntitlementService.class);
Entitlement ent = new Entitlement();
ent.setObjectKey(appInstance.getObjectKey());
ent.setFormKey(appInstance.getChildForms().get(0).getFormKey());
ent.setFormFieldKey(appInstance.getChildForms().get(0).getFormFields().get(0).getFldKey());
ent.setItResourceKey(appInstance.getItResourceKey());
ent.setEntitlementCode("MNEC2");
ent.setEntitlementValue("MyNewEntitlementValue2");
ent.setDisplayName("MyNewEntitlementName2");
ent.setDescription("MyNewEntitlementDesc2");
ent.setLookupValueKey(1);//have no idea what is this for
ent.setValid(true);
entSvc.addEntitlement(ent);
code works great, but what should be the lookupValueKey and what is it for?

The overall process that is supposed to happen OOTB is this:
1.  On a child table form, one of the fields is marked as Entitlement = True
2.  Populate your lookup with Entitlement Values (example is the Active Directory Group Recon Lookup scheduled task)
3.  Run the Entitlement List scheduled task.  This will check all form entries that have entitlement = true to retrieve the list of values and populate the ENT_LIST table with this values (or update any new or set IS_VALID=0 for any that were removed)
4.  Catalog Synchronization scheduled task will populate the values into the Catalog
The lookup value key is the LKV_KEY value that is tied to an entry in the lookup.  This is what ties the ENT_LIST table to the LKV table.
-Kevin

Similar Messages

  • Creating form using OIM API

    Hi
    can anyone help me in creatig a form and assigning it to a resource object.
    please tell what all should i mention in the map which is to be passed to createForm() method.
    Thank you

    Hi all
    what attributes i need to to map to create a from using OIM API
    createForm Method?
    I have tried with this but did not work:The form is getting created , i.e I am seeing an entry in DB.
    At the same time I am aslo getting an exception which is whown below:
    formMap.put("Structure Utility.Table Name", "SAM");
              formMap.put("Structure Utility.Description", "TESTING API USAGE FOR FORM");
    The Exceptions I get are :
    Thor.API.Exceptions.tcInvalidNameException
         at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.createForm(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.createForm(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormDefinitionOperationsSession.createForm(Unknown Source)
    09:05:13,772 ERROR [DATABASE] Class/Method: tcDataBase/writeStatement encounter
    some problems: ORA-02089: COMMIT is not allowed in a subordinate session
    java.sql.SQLException: ORA-02089: COMMIT is not allowed in a subordinate session
    09:05:13,819 ERROR [ADAPTERS] Event: Adding Columns to SDC. has encountered an error.
    09:05:13,819 ERROR [SERVER] Class/Method: tcDataObj/runEvent Error :EVT Fatal Rejection Occured
    09:05:13,819 ERROR [APIS] Class/Method: tcFormDefinitionOperationsBean/createForm encounter some problems: maoErrors:Error Adding Column.
    How can i resolve this?
    When and where can I view the form that I have created?
    Thank you

  • Creating self registration request using OIM API

    Hi guys,
    When we try to create a self regisrtation request using OIM API , we ge the following exception:
    We get this error when we set the following in Design console.
    Does user have to provide challenge information during registration = FALSE
    and passed an blank object in place of challenge question parameter in createSelfRegistrationRequest method in tcUtilityBaseClass.
    19:22:17,218 ERROR [REQUESTS] Error: Failed to save REQ_CONSOLIDATED_DATA_VALUE
    data for Create Entity.
    java.lang.NullPointerException
    at org.apache.xml.serializer.TreeWalker.dispatachChars(TreeWalker.java:2
    44)
    at org.apache.xml.serializer.TreeWalker.startNode(TreeWalker.java:414)
    at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:143)
    at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
    ormerIdentityImpl.java:389)
    at com.thortech.xl.dataobj.util.RequestDataConsolidator.convertNodeToXML
    (Unknown Source)
    at com.thortech.xl.dataobj.util.RequestDataConsolidator.addUser(Unknown
    Source)
    at com.thortech.xl.dataobj.tcDataBase.createRequestForCreateEntity(Unkno
    wn Source)
    at com.thortech.xl.dataobj.tcDataBase.createRegistrationRequest(Unknown
    Source)
    at com.thortech.xl.dataobj.tcDataBase.createRegistrationRequest(Unknown
    Source)
    at com.thortech.xl.ejb.beansimpl.tcUnauthenticatedOperationsBean.createR
    egistrationRequest(Unknown Source)
    at com.thortech.xl.ejb.beans.tcUnauthenticatedOperationsSession.createRe
    gistrationRequest(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
    tatelessSessionContainer.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
    ke(CachedConnectionInterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
    elessSessionInstanceInterceptor.java:169)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
    Interceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
    rceptor.java:121)
    How do we create a self registration request , using OIM API , with and without challenge questions?

    Well try this piece of code. This might be similar to yours but it worked perfectly for me. For you the error might be the attribute names which you are passing, it should be the one dfined in the FormMetaData xml as below.
         import Thor.API.tcUtilityFactory;
         // define you class below
         ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
         final Hashtable env = config.getAllSettings();
         Hashtable quesAns = new Hashtable();
         HashMap user = new HashMap();
         user.put("Users.User ID", "SelfTesting");
         user.put("Users.First Name", "SelfTesting");
         user.put("Users.Last Name", "SelfTesting");
         user.put("Users.Email", "[email protected]");
         user.put("Users.Password", "SelfTesting");
         user.put("ConfirmPassword", "SelfTesting");
         tcUtilityFactory.createRegistrationRequest(env, user, quesAns);
    And for the query of challenge QnA, these are the following combinations possible:
    1) Property Does user have to provide challenge information during registration set to TRUE
    - During self-registration from web console, it will show you Challenge Questions section on the right. If you do not select any questions, it will thow you an error there itself.
    - Doing it from API will create no difference(even if you pass a blank HashTable). The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    2) Property Does user have to provide challenge information during registration set to FALSE
    - During self-registration from web console, it doesn't show you Challenge Questions section on the right. The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    - Doing it from API, you will have to pass a blank HashTable as in above code. The request will be created successfully and on completion when the user tries to login, it will ask for Security QnA.
    Hope it works.
    Thanks
    Sunny

  • How to create Authorization policy using OIM 11g API

    Hi,
    Could you please let me know how to create Authorization policy using OIM 11g API.
    Thanks

    Constructing A Policy Programmatically
    http://docs.oracle.com/cd/E27559_01/dev.1112/e27154/cons_policy_prog.htm#CHDHACBF
    api ref for PolicyStore
    http://docs.oracle.com/cd/E21764_01/apirefs.1111/e22649/oracle/security/jps/service/policystore/PolicyStore.html#createApplicationPolicy_java_lang_String_
    something like below code to start with
    try {
    JpsContextFactory ctxFact;
    ctxFact = JpsContextFactory.getContextFactory();
    JpsContext ctx;
    ctx = ctxFact.getContext();
    PolicyStore ps = ctx.getServiceInstance(PolicyStore.class);
    if (ps == null) {
    // if no policy store instance configured in jps-config.xml
    System.out.println("no policy store instance configured");
    return;
    ApplicationPolicy ap = ps.createApplicationPolicy("Trading", "Trading
    Application","Trading Application.");
    } catch (JpsException e) {
    }

  • Raising Request using OIM ApI's in oim 11g R2

    Hi all
    I trying to raise a request using OIM API in R2. I have written a sample code and it is throwing me the below error....
    Exception in thread "main" java.lang.NullPointerException
    *     at oracle.iam.ui.custom.updateuser.<init>(updateuser.java:76)*
    *     at oracle.iam.ui.custom.updateuser.main(updateuser.java:118)*
    Please take a look at my code....
    RequestEntityAttribute rea = null;
    rea.setName("Modify User Profile");//This is the place where i am getting the error...
    System.out.println("I am Here3");
    rea.setAction(RequestEntityAttribute.ACTION.Modify);
    List<RequestEntityAttribute> lrea = new ArrayList<RequestEntityAttribute>();
    lrea.add(rea);
    RequestEntity re = null;
    re.setEntityData(lrea);
    List<RequestEntity> reqentity = new ArrayList<RequestEntity>();
    reqentity.add(re);
    RequestData requestData = null;
    requestData.setJustification("I need this Role");
    requestData.setTargetEntities(reqentity);
    String str = null;
    try {
    str = _service.submitRequest(requestData);
    } catch (InvalidRequestException e) {
    } catch (InvalidRequestDataException e) {
    } catch (RequestServiceException e) {
    } catch (BulkBeneficiariesAddException e) {
    } catch (BulkEntitiesAddException e) {
    Thanks in Advance

    look at below link
    Creating a Request via OIM 11g API
    http://www.pathmaker-group.com/querying-oracle-iam-requests/

  • Request Approval using OIM API

    Hi all
    Which API I need to use to approve a resouce request using OIM API?
    I have tried with the following:
    tcReqOp.setRequestResponse(85, 1 , "java.lang.String psResponse");
    i do not know what to pass in place of java.lang.String psResponse.
    I aslo tried passing "C","Completed"
    can anyone correct what I am doing?
    Thank u
    sas

    I assume you want to run a scheduled task for this. Try this approach. Run this query to retrieve specific approval tasks that are in a pending state:
    select oti.sch_key, mil.mil_name, to_char(oti.oti_update, 'dd-mon-yyyy hh24:mi:ss')
    from oti, mil, obj, pkg, orc, sch
    where oti.mil_key=mil.mil_key
    and oti.pkg_key=pkg.pkg_key
    and pkg.obj_key=obj.obj_key
    and oti.orc_key=orc.orc_key
    and oti.sch_key=sch.sch_key
    and oti.sch_status='P'
    and obj.obj_name='Test Object'
    and pkg.pkg_type='Approval'
    You can modify the obj.obj_name or remove, or do any changes you want. When you grab the time of the oti.oti_update, compare it against the sysdate to determine the time difference. If the update did not occur within that time, use this code:
    provIntf = (tcProvisioningOperationsIntf)getUtilityOps("Thor.API.Operations.tcProvisioningOperationsIntf");
    Hashtable taskHash = new Hashtable();
    taskHash.put("Process Instance.Task Details.Data", "<Insert Response Value Here>");
    provIntf.updateTask(key, taskHash) ; //---> Key is the same as the oti.sch_key field
    I have not tried this, but give it a shot.
    -Kevin

  • Using OIM API

    Hi All
    First can we use OIM API from a PC where OIM Server/Design console is not installed?If so, how?
    I have server running in a different PC in the same network.How do I connect from my PC to use OIM API.
    Thank u
    sas

    It shouldn't matter whether you are invoking OIM APIs from standalone Java app or WebApp as long as you are able to create an instance of tcUtilityFactory. Once obtained the process remains same.
    But if you are invoking APIs from JSP that is custom built but within same xlWebApp, then it gets trivial.
    Thanks,
    Aman

  • Creating a mapping using the API

    Hi Brian, I am curious about this use case - what's the reason you are looking to do it using the API? You can create several objects using the API and the most typical use case we have observed is where mapping developers create a pattern or what we call as a "template" - which is a mapping with various properties parameterized. For example you can create a mapping with the filter parameterized, or define a very generic mapping with source, target and the field map between those all parameterized. Once you do that, you can create a "task" for this mapping (known as Mapping Configuration Task) - that can be done using our UI or using our REST API. If you choose the latter, you can pass on parameter values as part of the API request. Suggest you to take a look at our new Developer Portal, and specifically at the sections Templates and REST API there. Feel free to post any further questions here. If you sign up to the developer program there, you will get much more direct help.https://community.informatica.com/community/technology_partner_network Amol

    I was wondering about creating a mapping using the API. It clearly states in the Dev guide that this is possible, but when I perform a get mapping request, I don't see all the information given for a certain object.  For example, I don't see an expression in the mapping object (although one exists when I view the object in Cloud).   Has anyone else done this? Is it easy to create objects via the API?  Thanks!

  • Using OIM APIs

    I need to use OIM APIs from a third party web application.
    I would like to know, would it be possible as our OIM server would be at a different m/c then the client web application.
    So how would the settings be done in this case, as we set some system variables in the code for accessing the OIM APIs which include mentioning the path of Xellerate folder.
    Kindly guide.

    I have gone through this link, and have used OIM APIs earlier, but in that case both my code and the OIM server were running on the same m/c.
    But now its a third party web app which wants to call OIM APIs, hence I would like to knw, how d following settings would be done.
    System.setProperty("XL.HomeDir", "D:/NewOIM/xellerate");
    System.setProperty("java.security.policy", "D:/NewOIM/xellerate/config/xl.policy");
    System.setProperty("java.security.auth.login.config", "D:/NewOIM/xellerate/config/authwl.conf");
    System.setProperty("log4j.configuration", "D:/NewOIM/xellerate/config/log.properties");
    System.setProperty("java.naming.provider.url", "t3://blrkec87910d:7001");
    As uptil now I was giving the local location of these folders.
    But now how would I give it?

  • How to create RMA lines using OE_ORDER_PUB API

    Hi All,
    We are trying to create RMA lines using OE_ORDER_PUB API but every time API creating <b>Standard Order Line</b> line type in application.
    My program is creating order header as a <b>Return Order</b>, i am passing corrent line type ids (1028 - RMA Shipment, 1027 - RMA Receipt) but oracle API is creating Standard Order Lines (ID 1001).
    Can any one tell me about that?
    Thanks
    Ravi
    null

    Check the defaulting rules setup. Defaulting rule will derive the line type based on the order type and shippable flag etc.
    Also check the line flows assigned to the order type in transaction types window.
    Thanks / Bhaskar Akkala

  • Provisioning OIM user using OIM APIS

    Hi All,
    Could anyone help me out on how to provision a User using OIM APIS.
    Thanks and Regards,
    Vaasu.

    public class GetGroups {
    tcUtilityFactory utilFactory = null;
    tcSignatureMessage moSignature = null;
    tcUserOperationsIntf moUserUtility = null;
    tcResultSet userResultSet,userSet = null;
    ConfigurationClient.ComplexSetting myConfig = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    final Hashtable env = myConfig.getAllSettings();
    Map v = new HashMap();
    public void UserGroups(String userid) {
    try {
    System.out.println(" I am in TRY");
    moSignature = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    utilFactory = new tcUtilityFactory(env, moSignature);
    moUserUtility =
    (tcUserOperationsIntf) utilFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    v.put("Users.User ID", userid);
    userSet = moUserUtility.findAllUsers(v);
    long user_key = userSet.getLongValue("Users.Key");
    System.out.println( " Group Name " + grpName );
    } catch(Exception e){
    e.getMessage();
    Like that
    moobjIntf =
    *(tcObjectOperationsIntf) utilFactory.getUtility("Thor.API.Operations.tcObjectOperationsIntf");*
    Map objmap =new HashMap(0;
    objmap.put("Objects.Name", "AD User") \\ just hardcoding this AD User you can pass it as variable also
    tcResultSet moResultSet = moobjIntf.findObjects(objmap);
    long obj_key = moResultSet.getLongValue("Objects.Key");

  • Using OIM Workflow to Manage Requests for ORM

    Has anyone used OIM as a workflow engine for users to request creation (not approval) of new roles in ORM? If so, what types of information are presented to the requestor (e.g., list of IT Roles)? What types of information are solicited from the requestor?

    Let me clarify my need.
    When a manager in a business line identifies the need for a new business role, I need a workflow mechanism by which they can request a new role be created in ORM and specify the IT Roles that should comprise that business role. This request step is separate from the actual role definition itself that would occur in ORM after the request was approved.

  • Error while creating authorisation policy using OIM 11g API

    Hi,
    We have a requirement to create ‘Authorization Policies’ (assign Data Constraints, Permissions & Assignments) using OIM 11g API’s.  I am using ‘oracle.iam.authzpolicydefn.api.PolicyDefinitionService & oracle.iam.authzpolicydefn.vo.AuthzPolicy’.  But when I am trying to attach Entity/Feature (User Management) to authorisation policy, it is throwing exception.  Below is the code snippet which I am trying to implement.
    Line1: PolicyDefinitionService policyService = oimClient.getService(PolicyDefinitionService.class);
    Line2: AuthzPolicy authPolicy = new AuthzPolicy();
    Line3: authPolicy.setName("Test Authz Policy");
    Line4: authPolicy.setDisplayName("Test Authz Policy Dsp Name");
    Line5: authPolicy.setDescription("Test Authz Policy Description");
    Line6: Feature feature = oimClient.getService(Feature.class);
    Line7: Action featureAction = feature.getAction(FeatureManagerConstants.Features.USER_MGMT.getId());
    Line8: List<Action> actions = new ArrayList<Action>();
    Line9: actions.add(featureAction);
    Line10: authPolicy.setActions(actions);
    Line11: policyService.createPolicy(authPolicy);
    Exception: oracle.iam.platform.utils.NoSuchServiceException: java.lang.ClassNotFoundException: oracle.iam.authzpolicydefn.api.FeatureDelegate
    The above exception is throwing at Line6.
    Let me know if anyone implemented.
    - Kalyan Mutya

    If you are using JDeveloper , can you able to get class after giving "." .If yes no than it is the problem with the jar file you are using .Check whether you can able to import oracle.iam.authzpolicydefn.api.Feature.
    Thanks ,
    Animesh anand

  • Creating access policy using OIM 11g APIs

    Is there a way to create an access policy using API? I see that there is AccessPolicyService but it only supports evalutePoliciesForUser. I need a way to add and modify policies.
    I'm using OIM 11.1.1.5
    Edited by: DJ on May 21, 2012 11:53 AM

    FYI, I hope the following links might be helpful, if you did not come across them before:
    OIM API for Create Access Policy:
    http://otndnld.oracle.co.jp/document/products/id_mgmt/idm_904/doc_cd/javadocs/operations/Thor/API/Operations/tcAccessPolicyOperationsIntf.html
    Example Code for OIM API Creation of Access Policy
    http://learnidm.blogspot.co.uk/2011_08_01_archive.html
    Thanks,
    Krish.

  • Create new schedule task using OIM API

    Hello,
    Steps for setting up eclipse :
    1)Create a new JAVA project.
    2)Right click on your newly created JAVA project & select properties.
    3)In Properties window select JavaBuildPath & select libraries tab.
    4)Click on AddExternalJar's button & add jar files from lib,ext folders of OIM client installation.
    5)Click OK.
    CODE<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<package oimscheduler;
    import java.util.HashMap;
    import java.util.Hashtable;
    import javax.naming.Context;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcChallengeNotSetException;
    import Thor.API.Exceptions.tcLoginAttemptsExceededException;
    import Thor.API.Exceptions.tcPasswordResetAttemptsExceededException;
    import Thor.API.Exceptions.tcUserAccountDisabledException;
    import Thor.API.Exceptions.tcUserAccountInvalidException;
    import Thor.API.Exceptions.tcUserAlreadyLoggedInException;
    import Thor.API.tcUtilityFactory;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import com.thortech.xl.util.config.ConfigurationClient;
    public class Scheduler extends SchedulerBaseTask
         tcUtilityFactory ioUtilityFactory = null;
         @Override
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createConnection();
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createConnection()
              try
                   System.setProperty("XL.HomeDir","D:\\Oracle\\OIM\\xellerate");
                   System.setProperty("java.security.policy","D:\\Oracle\\OIM\\xellerate\\config\\xl.policy");
                   System.setProperty("java.security.auth.login.config","D:\\Oracle\\OIM\\xellerate\\config\\authwl.conf");
                   System.setProperty("java.naming.provider.url","t3://localhost:7001 ");
                   System.out.println("Setting Configurations .....");
                   System.out.println("Starting .....");
                   ConfigurationClient.ComplexSetting config =
                   ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                   System.out.println("Login...");
                   Hashtable env = config.getAllSettings();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
                   env.put("java.naming.provider.url","t3://localhost:7001");
                   ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
              catch(tcAPIException ae)
                   System.out.println("Error In createConnection:tcAPIException "+ae.toString());
              catch(tcChallengeNotSetException cnse)
                   System.out.println("Error In createConnection:tcChallengeNotSetException "+cnse.toString());
              catch(tcLoginAttemptsExceededException laee)
                   System.out.println("Error In createConnection:tcLoginAttemptsExceededException "+laee.toString());
              catch(tcPasswordResetAttemptsExceededException praee)
                   System.out.println("Error In createConnection:tcPasswordResetAttemptsExceededException "+praee.toString());
    catch(tcUserAccountDisabledException uade)
         System.out.println("Error In createConnection:tcUserAccountDisabledException "+uade.toString());
    catch(tcUserAccountInvalidException uaie)
         System.out.println("Error In createConnection:tcUserAccountInvalidException "+uaie.toString());
    catch(tcUserAlreadyLoggedInException uale)
         System.out.println("Error In createConnection:tcUserAlreadyLoggedInException "+uale.toString());
              catch(Exception e)
                   System.out.println("Error In createConnection:Exception "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH");
                   user.put("Users.First Name","Oracle-SCH");
                   user.put("Users.Middle Name","JAVA-SCH");
                   user.put("Users.Last Name","SUN-SCH");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    After writing above code ,we have to create jar file.
    Steps To Be Follwed In OIM Design Console
    1)Copy jar file in ScheduleTask folder of your OIM server installation.
    2)Expand administration tree & select TaskScheduler.
    3)Create new task & in class name textfield we have to mention package.classname & mention appropriate values in other textfields & execute it.
    4)Check output.

    We need to override 2 methods while extending from SchedulerBaseTask i.e
    init() :- this method is run before execute by the scheduler .
    execute() :- is executed by the scheduler.
    Revised code :-
    package oimscheduler;
    import java.util.HashMap;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    public class Scheduler extends SchedulerBaseTask
         tcUserOperationsIntf moUserUtility = null;
         @Override
         public void init()
              try
                   System.out.println("In Init");
                   moUserUtility = (tcUserOperationsIntf) this.getUtility("Thor.API.Operations.tcUserOperationsIntf");
              catch (tcAPIException e)
                   e.printStackTrace();
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH1");
                   user.put("Users.First Name","Oracle-SCH1");
                   user.put("Users.Middle Name","JAVA-SCH1");
                   user.put("Users.Last Name","SUN-SCH1");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    Edited by: Rahul Shah on Jul 11, 2011 4:16 AM

Maybe you are looking for