Entity Adapter

1) If a new record is added into a table in OIMDB, will the entity adapter detect this change and invoke the java code?
2)Since user is not mapped to a profile directly, I guess we need to use an API to get the profile details of a particular user. Can anyone mention which API do I need to use to get the user profile?

In OIM 10g, we have created a entity adapter which listens to USR_STATUS attribute of USR table.When the entity adapter is invoked we need to retrieve the USR_LOGONID of that user whose USR_STATUS has changed in OIMDB. Which api am I supposed to use to retrieve this USR_LOGONID attribute?? or is there any other alternative approach in entity adapter to retrive LOGONID for an user whose status changes and triggers the Entity Adapter?

Similar Messages

  • Entity Adapter in infinite loop

    Hi,
    I have written code which takes userid as input and updates the user attribute using OIM API based an a criteria. I have attached this entity adapter on pre-update of the user form. The adapter is getting trigered but is going into infinite loop.
    Can anyone help me on how to avoid this ??
    Any help will be appreciated.

    Hi,
    I think don't need to update the user attribute using the OIM API. Assign the adapter return value to the UDF you want to update. So you dont have to use the API.
    When you use the API, the events are fired, so your code will go in a loop.
    If you have to update more than one field on the pre update, for example, I suggest you write an Event Handler. Below is a sample of an Event Handler code that I have assigned to the Specific Task Info dataobject:
    import com.thortech.xl.client.events.tcBaseEvent;
    public class EventHandlerSample extends tcBaseEvent {
         public NotifyTaskStatusChangedEvent(){
              this.setEventName("Event Handler Sample");
         @Override
         protected void implementation() throws Exception {
    String taskKey = this.getDataObject().getString("SCH_KEY");
         String newTaskStatus = this.getDataObject().getString("SCH_STATUS");
         String oldTaskStatus = this.getDataObject().getCurrentString("SCH_STATUS");
    System.out.println("Old Status: " + oldTaskStatus);
    System.out.println("New Status: " + newTaskStatus);
    if(this.getDataObject().isInserting()){
    if (this.getDataObject().isPostEvent(){
    //do something
    if (this.getDataObject().isPreEvent(){
    //do something
    }else if(this.getDataObject().isUpdating()){
    }else if (this.getDataObject().isDeleting()){
    Read the metalink Developing a Custom OIM Event Handler Using Eclipse [ID 604817.1]
    Renato.

  • Populate Lookup Using entity Adapter

    Hi,
    I need to populate(not pre-populating a lookup) a lookup code. This lookup code is attached to a lookup field in my child process form. I am thinking I have to create an entity adapter for the same. Am I correct? If yes then could someone please tell me where do I attach this adapter. I have tried attaching the adapter on the child form on pre-insert and pre-update. But the adapter gets triggered only when I already have selected a value from the lookup and click on Add. But I want the adapter to get triggered before I click on editing any field of the child form.
    Thanks,
    Supreetha

    Be clear in what you are trying to achieve.
    *1) I need to filter the data being presented in the lookup according to the organizations* -> This means the user who would be doing provisioning would be shown a list of departments (filtered) and it can select the one which is required.
    *2) I was hoping that I could achieve the same using the entity adapter* -> When you say entity adapter it means something automatic (like trigger on the provisioning task), it means that you just want to automatically populate the departments from the lookup based on the organization without letting the user who is provisioning select the departments manually.
    Both the above use-cases can be achieved easily:
    *1) Use dynamic look-up It would be lookup query with the where clause and you would pass the organization attribute in the clause. Look for similar threads or E-Business OOTB connector for more help*
    *2) Use OIM API's to fetch the departments you want to add & using a process task add these values to the child table of the user process form*

  • Generate random User Alias - Entity adapter

    Hi,
    I am a newbie. Can anyone please help me in telling steps for creating an Entity Adapter which generate a random User Alias.
    TIA.
    Got few threads that tell about pre-populate adapter, none for entity adapter.

    Hi,
    Follow the below steps to create new entity adapter in OIM
    To add the new created event handler to OIM server, perform the following steps:
    1. Write a java code to perform the needed operation ("Generate random user alias" in your case).
    2. Copy the file to OIM_HOME\xellerate\EventHandlers
    3. Open Design Console and navigate to: Development Tools -> Business Rule Definition -> Event Handler Manager
    4. Create a new Event Handler and specify:
    Event Handler Name: +<give the class name of your code>+
    Package: +<give the package name of your code>+
    Pre-Insert: Checked (for this scenario)
    5. Save the event handler
    6. Navigate to Development Tools -> Business Rule Definition -> Data Object Manager
    7. Search for "Users" and add the event handler to the Pre-Insert list.
    8. Save.
    Regards,
    NS

  • Creating Stored Procedure Task - Adapter Factory, Entity Adapter

    Hi All,
    I am trying to create a Stored Procedure Task for an Entity Adapter within the OIM design console.  I can connect to the database (Connection Status = Connection Established), but the Schema and Procedure dropdown boxes remain empty so I am unable to select the stored procedure I am wanting to run.
    OIM version 11.1.2.0.7
    MS SQL Server 2008 R2
    sqljdbc4.jar
    I can connect and execute the stored procedure locally on the SQL server as the user I am connecting as from OIM and have also tried to connect as the SA user.
    Can anybody suggest anything I need to check or need to enable/modify to be able to see the stored procedure?

    I found this blurb with a quick google search:
    byte[] myByteArray = System.Text.Encoding.ASCII.GetBytes("a text string");
    string myString = System.Text.Encoding.ASCII.GetString(myByteArray );
    See if this helps to turn the byte array into a string.
    -Kevin

  • OIM 11g: Entity Adapter on custom field.

    Hello,
    I wrote a pre-insert, pre-update entity adapter for a custom form field (SJSDS connector). I defined a adapter variable of type string that will be
    resolved at runtime. I was hoping to map this variable to the "User Type" field on the User Definition.
    When I try to map this variable to the User Definition, the "User Type" field does not show in the list.
    The list is being filtered based on the type of field and "User Type" is of type List of Values.
    How can I get around this issue? The adapter factory does not allow me to set my variable to type List Of Values.
    Regards,
    Sunny

    Following are the the list of mappings. The ones wth similar names are easy to guess. Notice that USR_COUNTRY is missing in the list. I have requested Oracle to log a bug for this and for any other missing fields. If accepted this should be available in the next patch.
    (Mapping between user definition qualifiers on data object manager form and actual USR fields)
    === Process Definition ===
    Name -> pkg_name
    Type -> pkg_type
    === Object Definition ===
    Object Name -> obj_name
    Object Type -> obj_type
    Object Target Type -> obj_order_for
    === Organization Definition ===
    Organization Name -> act_name
    Organization ID -> act_key
    Organization Type -> act_cust_type
    Organization Status -> act_status
    Organization Parent ID -> parent_key
    + Organization UDFs
    === User Definition ===
    User Key -> usr_key
    Request Key -> req_key
    Identity -> usr_fss
    User Login -> usr_login
    Role -> usr_emp_type
    Password -> usr_password
    First Name -> usr_first_name
    Middle Initial -> usr_middle_name
    Last Name -> usr_last_name
    Disabled -> usr_disabled
    Type -> usr_type
    User Status -> usr_status
    Manager -> usr_manager_key
    Organization -> act_key
    Start Date -> usr_start_date
    End Date -> usr_end_date
    Provisioning Date -> usr_provisoning_date
    Deprovisioning Date -> usr_deprovisioning_date
    Provisioned Date -> usr_provisioned_date
    Deprovisioned Date -> usr_deprovisioned_date
    Email Address -> usr_email
    Email -> usr_email
    + User UDFs

  • OIM API - how do you get a tcUtilityFactory in an Entity Adapter?

    How does one get a tcUtilityFactory in an Entity Adapter? I thought I could map it as a parameter and pass it it as a Database Reference object, but when I go to the Mappings in Data Object Manager, the only possibilities for mappings are Entity Fields (USR_*)
    I know in a scheduled class you can do something like getDatabase(), does that exist if you extend a tcBaseEvent?

    First, I was able to resolve it by using getDatabase(), but to address what you guys are saying...
    Yes, I can create a a variable in my adapter of type Object and map it as you describe, that's all fine. But if my adapter is an Entity Adapter then, when you want to use it you have to:
    1. Go to Development Tools -> Business Rule Def -> Data Object Manager
    2. Lookup the Users form
    3. Assign the adapter to Pre-Insert (or whatever)
    4. MAP IT... this is where what i'm saying won't work... you cannot MAP to the variable you defined when you created the adapter. You have no choices there for Database References... the only choices you have are User fields.. look for yourselves.

  • OIM: Entity adapter task status

    Hi there,
    Is there a way to find out if a given entity task has completed on a given user and if so successfully or with errors/exceptions? I have attached an entity task to the user's post-insert list that calls on an entity adapter.
    Thanks

    I would suggest in your code put something like "EMAIL SEND STATUS|User Login|Success/Failure" as a System.out.println or even use proper logging and just to log.error for the Failure. If you have a try statement around your email, put the Success message after your email is successful and your failure message in the catch piece.
    -Kevin

  • How does entity Adapter work ?

    Hi,
    I have an adapter which will update the user attribute based on the email. Attached this as <b>pre-update</b> in the data object manager of design console and the mapped the input variable to email(value from entity field) and output of the method to the entity field(field to be updated in USR form).
    Now if I update the user from the admin console, then my adapter works fine.
    <b>But this adapter is trigerred even if I am creating new user through Admin console?? which should not the case as it is pre-update adapter</b>
    Is there anything which I am missing while configuring the adapter or If this is how it works then whats the difference between pre-insert and pre-update adapter??
    Edited by: hrushi on Mar 8, 2010 7:24 PM

    Hi Rajiv,
    Thanks for the post.. :)
    A small doubt about event handler... Can I use tcUserOperationsIntf and update the record from API and attach this with event handler?? Or Is this process different??
    I mean Will I be again thrown into infinite loop if I update from API ??

  • Rule-Generator Adapter is not being triggered

    I have created a rule-generator adapter and assigned it to pre-insert and pre-update of a process form (mapped the return value to process form field) but the system does not trigger the adapter when I add the resource to user. Any ideas why this happens?
    Regards,
    Kostas

    I tried with an entity adapter but the effect is the same (restarted the server). It looks like the system does trigger the pre-insert and pre-update events. Any ideas?

  • Pre populate adapter

    Hi,
    oim v 11G
    I want to "use" the user password when provision to the DB .
    I have created a prepopulate adapter
    but then I can not seem to be able to connect this adapter to get the valuse form the user process.
    in the "data object information" - i don't see the users form (as i used to see in v9 ) so i can not perform the operation.
    any idea ?
    thanks
    s.

    Why would you need to put a pre-populate in the Data Object Manager form. Dont you put it in the Form Designer -> Pre-populate section ? ?
    I hope it should be the same in 11g as well.
    Where as if you are talking about Entity Adapter which is Event Handlers in 11G then its an altogether different process which involves:
    - Creating an xml for your plugin
    - Importing it into the MDS database using import utility
    - Registering your plugin

  • OIM 11g Entity Adapters

    Hi all,
    I have developed an Entity Adapter using Oracle Identity Manager Design Console which generates different account user ids against a user defined field on Process Form.
    Here I'll provide more details about my scenario.
    SCENARIO*
    a. OIM version: 11.1.1.5.0
    b. Process Form fields (Siebel Process Form):
    - User ID
    - First Name
    - Last Name
    .... [any other out of the box Siebel Connector field]
    - Anonymous Flag (this is a user defined field on Siebel Process Form)
    c. Entity Adapter
    - this adapter has an input variable which is Process Form user defined field "+Anonymous Flag+"
    - if "+Anonymous Flag+" is checked (true) then the adapter sets the return value to "*Anonymous*"
    - else if "+Anonymous Flag+" is uncheked (false) then the adapter sets the return value to "*NOT Anonymous*"
    - the adapter return variable is mapped to Process Form "+User ID+"
    - NOTE: the adapter return values are only for testing pourpose. In the future, the adapter should return two different syntax for User ID.
    For example in case of Anonymous Flag checked, account User ID should be +<surname>+ + "+_+" + +<name>+ + +<random_number>+; while in case of Anonymous Flag unchecked, account User ID should be <+company_name+> + <+random_number+>
    d. Access Policies
    - an access policy "+AP_for_Anonymous+" linked with a role "+ROLE_for_Anonymous+" that sets "+Anonymous Flag+" to checked (true)
    - an access policy "+AP_for_NOT_Anonymous+" linked with a role "+ROLE_for_NON_Anonymous+" that sets "+Anonymous Flag+" to unchecked (false)
    RESULTS*
    Assigning one of roles "+ROLE_for_Anonymous+" or "+ROLE_for_NON_Anonymous+", on Process Form, user defined field "+Anonymous Flag+" is valorized correctly, but Entity Adapter doesn't seems to work. In fact Process Form User ID remains empty.
    QUESTIONS*
    1. Are Entity Adapters associated with accounts supported in OIM 11g? I found a couple of posts that assert that Entity Adapters don't exist in OIM 11g (Event handlers are not getting invoked in oim 11g. or that state Entity Adapters are not supported with the User Form (Issue in adapters mapping in OIM 11g About this I found Entity Adapter Oracle documentation (http://docs.oracle.com/cd/E21764_01/doc.1111/e14309/creadp.htm#BABDHECI)
    2. If Entity Adapters are not applicabile to my scenario, can I use Event Handlers? If yes, what are the entity types that I can specify in event handler metadata xml file? For "event handler metadata xml file" I mean the following
    <action-handler class="com.test.sample" entity-type=????? operation="CREATE" name="Sample" stage="postprocess" order="1007" sync="TRUE"/>3. If Entity Adapters are not applicabile to my scenario, what are the operations that I can specify in event handler metadata xml file?
    Thank for your help,
    Daniele

    Entity Adapter still exist in 11g. Yes, you can use Event Handler .
    But why don't you use Process task/prepopulate adapter for your scenario. Try below
    1. You have some condition on which role is assigned. Based on same condition populate this Anonymous/ Not Anonymous(true/false) at user profile.
    2. write a pre-populate adapter to generate User ID. pass parameters Anonymous flag along with other user profile attribute(first name, last name..etc.) . Here based on flag you will be able to decide User ID.
    3. attach this pre-populate with process form.
    4. already you have two access policy which is fine. just edit both and remove the Anonymous flag value else can leave it as it is.
    Note: for populating Anonymous flag on user profile create a new UDF and try to populate in trusted recon.else write post process event handler for same which will execute before access policy. I mean the order of evethandler should be between 1003 to 1008
    If you have doubt let me know
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Prepopulate Adapter and Rule Generator Adapter

    Can anyone tell me the exact difference between Prepopulate adapter and Rule generator adapter? I have read the documentation but both seems to be same.
    Please explain me with an example scenario..
    Regards
    Pavan

    Hi,
    See if this help you in gaining more understanding.
    PrePopulate Adapter: They are mapped with the fields of process form and are used to prepopulate the fields value during the resource provisioning.
    RG Adapter: A RG Adapter incoporates business rules to the fields of either OIM user form or user defined form so that these fields can be automatically populated
    and saved to the database. You can use the RG & Entity Adapter to construct the userid from the firstname and lastname fields and prepopulate it.
    Difference:
    While both these adapter can be used to prepopulate values but RG Adapter has one to one mapping with the RG adapter and custom field. An RG Adapter once
    attached to a field cannot be attached with another field thus preventing adapter reuse. Beside this, no other type of adapter can be associated with that custom
    field.In contrast, the PrePopulate adapter can be reused and attached with multiple fields.
    Hope this will help you.
    Regards
    Sunny Ajmera

  • Rule generator adapter

    hi,
    Please explain me whats the use of rule generator adapter where entity adapter and prepopulate adapter does all the functions of a rule generator.
    i have gone through the docs but it doesnt explain the difference.
    Thanks in advance,
    Cat's Paw

    You are correct in stating the functionality of the oim adapter types is overlapping. The documentation describes the recommended classification types of the adapters while you can achieve the same functionality by creating some other adapter type in similar fashion.
    I would suggest you to use the recommended approach as mentioned in the documentation.

  • Is there a way to disable OIM entity adapters while doing batch upload ?

    Hi experts,
    I have an adpater to generate UserID from a sequence based on user-type for creation of OIM users thru web UI.
    I have attached this to Users form in data object manager.
    We also have a 3-step batch bulk procedure from CSV file which checks data enterd, generates pword email etc etc and builds CSV file with records to be inserted.
    In the 3rd step, scheduled task runs with CSV file as input and creates users in OIM DB.
    The problem is the entity adapters are also getting triggerd which generate another UserID for each user created.
    This leads to loss in sequence numbers.
    Is there any way of disabling this ?? We need to have both in place, but this conflict should not arise ..
    Please advice.
    Regards,
    Chetan

    Even if i check the value of that UDF and execute the code to generate UserID based on that value,the function still has to return a value right ??Attach entity adapter at Post Insert.
    Create UDF with Default value "CSV".
    Add one more parameter in your java class which is responsible for generating userid.
    You can directly map UDF with Class Parameter.
    if (UDF == CSV){
    Don't Generate
    else {
    Generate with your logic
    And if that function is getting called for every user record in the CSV file, then i cant return a dummy value for it as well .You can use update User API of tcUserOperations

Maybe you are looking for