IOM, 11g of the API

Hi all

I have a scenario of generation of ID of the user when creating the user account. I use preprocess managers to generate the user ID.

I have the logic to generate the user ID. Here is the snippet for the same thing.

=================================================

public String getUserNameFromPolicy (map)
{
System.out.println ("MyCustomUserNameGenerator ###getUserNameFromPolicy");
printMap (map);
String str1 = ((String) map.get('zoom') ("First Name")) .substring (0, 2);
String str2 = ((String) map.get('zoom') ("Last Name")) .substring (0, 3);
String username = (new StringBuilder()) .append (str1) .append (str2) m:System.NET.SocketAddress.ToString ();
System.out.println ((new StringBuilder()) .append ("Generated user name is->") .append (username) m:System.NET.SocketAddress.ToString ());
Returns the user name;
}

==================================================

I need to check if the user name is already exists in the IOM system or not. If exist add the incremental number with the user ID.

Can someone help me in the use of the API OIM 11 G to check the user name exists or not in the IOM, before userAccount is created.

Thank you
Sandeep D

Look at the code snippet below.

UserAPI = Thor.API.Operations.tcUserOperationsIntf
oimClient.getService (Thor.API.Operations.tcUserOperationsIntf.class);
HashMap usrHash = new HashMap();
usrHash.put ("Users.User ID", username);
ResultSet Thor.API.tcResultSet;
try {}
resultSet = userAPI.findAllUsers (usrHash);
userIDCount = resultSet.getRowCount ();
If (userIDCount > 0) {}
userExists = true;
}
} catch (tcAPIException e) {}
System.out.println ("Exception occurred");
}

Tags: Fusion Middleware

Similar Questions

  • How to read the approval tasks of his application by the IOM by using the API?

    Hello
    Is there a way to read task approval and State corresponding with the IOM i.e. APIs If your workflow includes two levels of approval, the approval tasks would be: 1. approval of the Manager and 2. Permission of owner role?

    I was looking at the API documentation. but it did not help, all I could find is to read the steps and the status of each step, i.e. request level, level gauge and operation?


    Thank you
    Coralie

    link below will help you locate BPEL worklist API

    http://technology.AMIS.nl/Blog/1496/invoking-BPEL-worklist-API-from-remote-server-with-Java
    http://docs.Oracle.com/CD/E12839_01/integration.1111/e10224/bp_worklistcust.htm

  • Commissioning user IOM by using the APIs of the IOM

    Hi all

    Could someone help me how to set up a user using the API of the IOM.

    Thank you and best regards,
    Valentine.

    http://download.Oracle.com/docs/CD/B32479_01/doc.903/b32449/chapter1.htm
    http://otndnld.Oracle.co.jp/document/products/id_mgmt/idm_903/doc_cd/Javadocs/operations/Thor/API/operations/tcUserOperationsIntf.html#provisionObject (long, % 20long)

    http://forums.Oracle.com/forums/thread.jspa?threadID=956802&TSTART=0

    provisionObject

    public long provisionObject (long plUserKey,
    long plObjectKey)
    throws Thor.API.Exceptions.tcAPIException,
    Thor.API.Exceptions.tcObjectNotFoundException,
    Thor.API.Exceptions.tcProvisioningNotAllowedException,
    Thor.API.Exceptions.tcUserNotFoundException,
    tcAPIException

    Configure an object for a user directly without going through an application. The resource is supposed to not be a service account.

    Parameters:
    plUserKey - the key to the user.
    plObjectKey - the key of the object to be available.
    Returns:
    The Instance of the Object key for the created provisioning record
    Throws:
    tcAPIException
    tcObjectNotFoundException
    tcProvisioningNotAllowedException
    tcUserNotFoundException

    Just pass the key of the object and the user key.

  • Issue while deploying code that uses the api of the IOM: OIMClient

    We strive to deploy a war file with some java code that is interfaced with the IOM by using the api OIMClient. Note that we have all necessary spring pots and it works great on Tomcat. Our production env is on weblogic and when deploy us the file. War on weblogic deploys it fine. But when we test some web pages, we get the following error:

    Root cause]] of ServletException.
    java.lang.NoClassDefFoundError: org/springframework/jndi/JndiTemplate
    to oracle.iam.platform.OIMClient. < init > (OIMClient.java:83)
    ......
    Truncated. check the log file full stacktrace
    >


    The class file is available in a container called Spring framework with the same package structure: org.springframework.jndi.jnditemplate. I wonder why he cannot find the definition for this class. I also tried to delete these jars to war file and adding them to the lib dir field. I always find myself with the same exception.

    Appreciate all the help I can get.

    Published by: 958829 on Sep 12, 2012 23:01

    try to add the jar of spring separately to help:->-> deployments weblogic console add jars

  • Create 10000 of TI resource Instance using the API of the IOM.

    Hello

    I need to develop a utility that will create 1000's of resources COMPUTER to IOM, the utility must read the resource data in a CSV file.

    Utility must use the Api of the IOM to develop this feature...

    Please provide feedback

    Kind regards


    Abreu

    Thanks Abhishek.

    I have a doubt linked to this resource setting that is there in the CSV file, how we can pass these parameters as aphAttributes in createITResourceInstance method.

    Kind regards

    Sri

  • How to use the API of the IOM in Self Service identity custom region

    Hi all

    I developed a custom in Self Service identity using this guide area: customization of the Interface - 11 g Release 2 (11.1.2.1.0)

    Inside this area, I have a simple form that allows the creation of users. This form uses the API of the IOM, in particular the following line:

    UserManager usermgr = Platform.getService(UserManager.class);
    

    The error I got is:

    < error > < oracle.iam.platform.utils.SpringBeanFactory > < BEA-000000 > < parsin instantiation Spring Bean Factory Failed.IOExceptiong XML document resource path of class [META-INF/iam-spring-config. XML]; nested exception is java.io.FileNotFoundException: resource path of class [META-INF/AIm-spring-config.] XML] could not be opened because there is no >

    I use it because I think that I am inside the ISS. For this reason I don't want to use the client method to retrieve the UserManager (which obviously works):

            String ctxFactory = "weblogic.jndi.WLInitialContextFactory";
            String serverURL = "t3://" + HOSTNAME + ":" + PORT;
            
            Hashtable env = new Hashtable();
            env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, ctxFactory);
            env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, serverURL);
            
            OIMClient oimClient = new OIMClient(env);
            try {
                oimClient.login(OIM_USERNAME, OIM_PASSWORD.toCharArray());
            } catch(LoginException e) {
                e.printStackTrace();
            }
            UserManager usermgr = client.getService(UserManager.class);
    

    It is possible to use the UserManager methods in this case?

    Thanks in advance for your help.

    Manual

    Solved.

    Just replace

    UserManager usrmgr = Platform.getService(UserManager.class);
    

    with

    UserManager usermgr = OIMClientFactory.getUserManager();
    

    Manual

  • How to assign the client to the user via the API of the IOM

    Hi all

    Can someone tell me which method I should use to assign a customer to the user using the API of the IOM...

    Thanks in advance

    I think the problem culd be with the wrong import statement.

    You must add the import statement below to assign roles admin sectarian

    Import oracle.iam.platformservice.api.AdminRoleService;

    HTH

  • need to extend the end date of user using the API of the IOM

    Hello
    I have a requirement extension enddate to the user to some 30 days using IOM API-tcUserOperationsIntf. I know there is a Thor.API.Operations.tcUserOperationsIntf.updateUser (Thor.API.tcResultSet poUserResultSet, phAttributeList java.util.Map) method that can be used to update the data of the user in DB IOM.
    If someone has run this method then please let me know a procedure step by step to implement this method. I am new to using the API of the IOM.


    Thank you
    Kalpana.

    Try this:

    tcUserOperationsIntf userOperationsIntf = (tcUserOperationsIntf) getUtility ("Thor.API.Operations.tcUserOperationsIntf");

    protected void execute() {}
    try {}
    beginning of the custom code
    tcUserOperationsIntf oUserObj = (tcUserOperationsIntf) getUtility ("Thor.API.Operations.tcUserOperationsIntf");
                   
    System.out.println ("executing query");
    custom code starts
    tcUserOperationsIntf usrOps;
    The criteria map = new HashMap();
    Criteria.put ("Users.Key", "86821");
    System.out.println ("user key-86821");
                   
    tcResultSet users = oUserObj.findUsers (criteria);
    System.out.println (UsersList.getTotalRowCount ());
    Criteria.put ("Users.End Date 12:01:56.000000000 2012-06-24","" ");
    oUserObj.updateUser (users, criteria);
    } catch (Exception e) {}
                   
    }
    }

  • create the policy by using the API of the IOM: tcAPIException:insert exception failed

    Hello

    I need to create the policy by using the API of the IOM.

    Here is my code:

    long [] provObjKeys is {10};.
    Boolean [] revokeObjectIfNotApply = {true};
    long [] denyObjKeys is {11};.
    long [] groupKeys is {6};.
    tcAccessPolicyOperationsIntf accessPolicyOp = (tcAccessPolicyOperationsIntf) ioUtilityFactory.getUtility ("Thor.API.Operations.tcAccessPolicyOperationsIntf");

    HashMap policyCriteriaMap = new HashMap();
    policyCriteriaMap.put ("Access Policies.Name", "computer laptop Access Policy");
    policyCriteriaMap.put ("Access Policies.Description", "computer laptop access political Desc");
    policyCriteriaMap.put ("Access Policies.Note", "computer laptop Access Policy Note");
    policyCriteriaMap.put ('Access Policies.Retrofit Flag', ' yes');
    policyCriteriaMap.put ("Access Policies.By Request", "No");

    long accessPolicyKey = accessPolicyOp.createAccessPolicy (policyCriteriaMap, provObjKeys, revokeObjectIfNotApply, denyObjKeys, groupKeys);

    but the political establishment fails.

    Not able to discover the problem.

    policyCriteriaMap.put ("Access Policies.Retrofit Flag", "1");
    policyCriteriaMap.put ("Policies.By application access","0");

  • Access to the API of the IOM to encrypted settings

    Hello everyone

    I need to access the AD and I was wondering if I can get the AD server resource instance AD administrator password? I know that I should test it, but being new to IOM would make this task to take a long time. Your experienced response appreciated me would save this time looking for another approach, if this is not possible.

    Thanks in advance

    TI resource parameters are available using the API. Even encrypted values will be of course available. They are however all encrypted when you try to view the values directly in the database. The encrypted checkbox makes just considered astericks console design.

    You can use the code: HashMap com.thortech.xl.util.adapters.tcUtilXellerateOperations.getITAssetProperties (getDataBase (), itResource);

    Or you can use the tcITResourceInstanceOperationsIntf API.

    -Kevin

  • How can I update userdata with the APIs of the IOM

    Hello

    How can I update userdata (Boolean attribute in the form of xellerate) using the API of the IOM

    example:
    If want to update User Lock


    Thank you

    Published by: user11963802 on April 15, 2010 23:39

    UserData.put ("Users.User ID", msUserId);
    UserData.put ("USR_UDF_IS_FIRST_LOGON", "0");
    userIntf.updateUser (tRs, userdata);

    I hope that tRs is the tcResultSet of the user, i.e., tRs = userIntf.findUser (hashmap).

    When you update by '0', Boolean field is unchecked, to check that you have to pass '1'.

    Thank you
    Suren

  • Complete the process with the API of the IOM.

    Hello

    I'm new to IOM then someone can help me regarding the following problem?

    I defined a procurement process (provisionAPP) who have a process task. This task will create a (case) ticket in our ticket handling system. (I did it with the Java adapter and it works very well).
    If the ticket is created successfully, the status of the task in process (provisionAPP) is going to be on "Waiting". ("It appears under" ' resources > > resources Provisioning profile Details ").

    I wrote a task scheduler to monitor the status of this ticket. If the ticket is closed, I have to change States of the process task (provisionAPP) to 'Set up' or 'done '.

    To change the status, I tried the following.

    Hashtable TaskHash = new Hashtable();
    taskHash.put ("process Instance.Task Details.Status", "Completed");
    tcProvOps.updateTask (tskID, taskHash); (tcProvOps is an Instance of tcProvisioningOperationsIntf)

    This works very well and will change the status to 'Complete', but the problem here is that it will run the process attached to the task of process (provisionAPP). So, it will create a ticket again. I didn't need this cos it is already running initially.

    I would like to know how to change the status of the process (provisionAPP) (-> say pending) configured via API IOM task without running the process attached to this task.


    It would be great if someone can help me?

    You must get the key of task and then instance using them, you can use the api complete manually. Set the job to the status of the object for MC map to put in service. You just need to get the key of task instance.

    -Kevin

  • IOM, 11g event handler: get the actor

    In an event handler, is it possible to get the actor (the user who makes the changes on the target user) in the orchestration, or elsewhere in the eventhandler object?

    At any time you can get current actor with the api ContextManager.

  • Using the API of the IOM tcResultSet

    Hello
    I'm trying to use the tcResultSet class. Simply using "import Thor.API.tcResultSet;" did not work.
    I found the documentation (http://download.oracle.com/docs/cd/B32479_01/doc.903/b32449/chapter1.htm) who says:
    Set CLIENT_CLASS = < fully qualified name of your custom class to the client API >.

    I'm not sure what value I put here. In fact, I do not know if what I do will help me to access the interface from the result set.
    Appreciate any suggestions.
    Thank you.

    When you perform one of the API which returns a value of type tcResultSet, you can then access this resultset by something like the following:

    tcUserOperationsIntf userIntf = (tcUserOperationsIntf) tcUtilityFactory.getUtility ("Thor.API.Operations.tcUserOperationsIntf");
    UserHash Hashtable = new Hashtable();
    userHash.put ("ID Users.User", );
    tcResultSet userSet = userIntf.findUsers (userHash);
    for (int i = 0; i)<>
    userSet.goToRow (i);
    userSet.getStringValue ("the Users.First name");
    userSet.getStringValue ("the Users.Last name");
    }

    You will need java experience to do this kind of things.

    -Kevin

  • Method of the API to use to get the userlist provided to an object

    Hello

    What is the method of the API of the IOM to used to get the userlist which is provisoned for a particular object. ?

    Must, I'll input the name of the resource to say "DIO" and status of so-called resources ' set up ' and I want to get the users.

    can someone specify the method of the API to use.

    Thank you
    Naveen

    Use the following tcObjectOperationsIntf API method:

    getAssociatedUsers

    Thor.API.tcResultSet getAssociatedUsers (long objectKey,
    attributeMap java.util.Map)
    throws tcObjectNotFoundException,
    tcAPIException,
    tcAPIException

    This method is used to get the list of users who are associated with a specified object (implemented, off, on, etc.). If no filter is specified, it returns all the users who are associated with this object.

    Parameters:
    objectKey - this is the key of the resource object
    attributeList - a map of key-value pairs in which the result set should be filtered.

Maybe you are looking for