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

Similar Messages

  • Generate Random Password by policy

    Hey guys,
    I'm trying to put together some code to randomly generate a password for new users that would match up with the user's associated password policy. I have this code mapped as a entity adapter on the pre-insert. The problem i am having is trying to retrieve the password policy that is associated with the new user.....the tcPasswordOperationsIntf utility class has a method called getUserPasswordPolicy which takes the usr_key as an argument.....but since the user hasn't been created yet the method fails with an usr_key not found error.
    anyone know how i can get the password policy for a new user? has anyone done anything like this before?
    Thanks in advance!

    Well if you are trying to set the password for the Users created in OIM then the password policy must be attached to Xellerate Users resource object. So you have an option of fetching the password policy using another API getObjectPasswordPolicyDescription of the same interface. You need to pass the Object Key in this case. This must return the ResultSet for the same thing you are expecting.
    The you can validate the password accordingly.
    Thanks
    Sunny

  • 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.

  • How do you generate random data info using json and spry?

    I have a mobile applicaton that uses spry datasets that dynamically populate a jquery mobile listview by using a json file. Everything is operating as it should.
    However, I would like to understand how to pull random objects from the json file to have them displayed on a different page.
    My json file is standard and not complicated. It has several levels. Each is represented as below:
                                  { "Level1":
                                                                {"imageurl":"images/_myimage.png",
                                                                "someData":"S,A,P,R",
                                                                "levelLongDesc":"further description",
                                                                "name": "John Doe",
                                                                "page": "referencepage",
                                                                "description":"The description of the image"
    {"imageurl":"images/_myimage.png",
      "someData":"S,A,P,R",
      "levelLongDesc":"further description",
      "name": "John Doe",
      "page": "referencepage",
      "description":"The description of the image"
    Json file Level1 has about 70 objects
    What I would like to do is randomly load one of the Level1 object arrays into the page when the user selects a Level 1 radio button that is on the screen. I know how to create the page, radio buttons and basics, but just don't know how to pull in the random data.
    I've found one code sample on this site that speaks to spry and xml, but I haven't been able to apply it in any way that works for me with the json file:
    http://forums.adobe.com/message/662551
    I've also googled. There isn't much on spry datasets with json and generating random info. There was a little bit on sorting, but that didn't help either.
    Does anyone have a good example/tutorial of how to use the random function with spry/json?
    TIA
    -Rachel

    I've done similar things before.  A few thoughts for you:
    1. I'm assuming you're doing a buffered period or frequency measurement on the incoming encoder pulses, right?  First key point is that you'll have data that is spaced equally in position, but not equally in time.  If you are looking for a time-based FFT such that increasing speed will shift your spectrum, you're going to need to go through an interpolation process to resample your data as though equally-spaced in in time. 
    2. Your 149 pulse per rev encoder may be a significant source of error unless its 149 pulses are placed with extreme accuracy.  Any error in pulse placement violates your underlying assumption of data that is equally-spaced in position.  It'll be very helpful to send your data through a software lowpass filter to attenuate those artifacts. 
    3. I am not sure what you mean by "decompose the buffered data (array) into a single datastream."  You'll get an array of periods / frequencies from the call to DAQmx Read.  If you want to use it in a LabVIEW waveform datatype, you'll first need to do the resampling to create equally-spaced-in-time data.  The LabVIEW waveform datatype (and all the analysis functions like FFT that use it) depend on receiving data with a fixed constant time interval between samples.
    -Kevin P.

  • Is it possible to use the Internet User Alias?

    Hi,
    We are currently authenticating users against an LDAP datasource and pulling back the employee id as the SAP username in order to provide the correct authorisations. The problem with this is that we then have to create another user account for people who require R/3 access via the GUI.
    What we want to be able to do is to use the Internet user alias against their R/3 account so that we essentially only have 1 account to maintain for each user.
    Does anyone know how this can be achieved?
    Thanks in advance!
    Keith

    If you are using ABAP for your UME user store, the LDAP IDs are probably stored as aliases in the backend ABAP system. If that's the case, your users already have corresponding, automatically generated, backend R3 IDs. Trying searching by alias for one of your web users and see if there is a user master record for that user. They can log into SAPGUI using that auto-generated ID, although you may need to assign a password first. From the user perspective, it will still seem like they have two different accounts though, since the login ID will be something new for sapgui.
    http://help.sap.com/saphelp_nw70/helpdata/en/52/67119e439b11d1896f0000e8322d00/content.htm

  • 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*

  • 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

  • Need to generate Unique User IDs in OIM

    Hi,
    I am working in OIM 9.1 environment right now. I need to generate unique User IDs for all the users who come via self request. My problem is that while creating the user ids, I can search for the existing users in OIM and AD easily, but i am unable to search the users for whom the request has been made but approval is pending. Such user ids are reserved in OIM so if an employee with the same first and last name comes, there might be a conflict which might lead to an error. Can someone suggest any api or query using which I can search for these IDs under request in OIM.

    If i use the userid generator as Pre-Insert, there will be a conflict if two similar named users request at the same time (or if one of the request is yet to be approved).
    I am getting the below error while creating user id as Pre-Insert. What is the correct way of getting this done? Please suggest.
    012-11-20 19:25:41,787 INFO [STDOUT] Running CREATEUSERINOIM
    2012-11-20 19:25:41,788 INFO [STDOUT] Target Class = com.pldt.adapter.createuser.CreateUserInOIM
    2012-11-20 19:25:41,788 INFO [STDOUT] ***********************Inside Create User****************************
    2012-11-20 19:25:41,805 INFO [STDOUT] =====================Before Date Insert===============
    2012-11-20 19:25:41,805 INFO [STDOUT] =====================hiredate===============1970-01-01
    2012-11-20 19:25:41,805 INFO [STDOUT] ***************************section***************XTNL Active
    2012-11-20 19:25:42,647 INFO [STDOUT] Running DISABLEUSERINOIM
    2012-11-20 19:25:42,649 INFO [STDOUT] Target Class = com.pldt.adapter.disableuser.DisableUserInOIM
    2012-11-20 19:25:42,649 INFO [STDOUT] Entered Method retrieveUtility in SelectApprovalUser class
    2012-11-20 19:25:42,662 INFO [STDOUT] *************************************Inside disableOIMUser**********************
    2012-11-20 19:25:42,662 INFO [STDOUT] *************************************2**************
    2012-11-20 19:25:42,663 INFO [STDOUT] ******************tcUserIntf**********Thor.API.Operations.tcUserOperationsClient@5fd3131f
    2012-11-20 19:25:42,663 INFO [STDOUT] *************usrkey**********713
    2012-11-20 19:25:42,664 INFO [STDOUT] *************usrkey**********XTNL Active
    2012-11-20 19:25:42,664 INFO [STDOUT] ********************employeeGroup check Value*************XTNL Active
    2012-11-20 19:25:42,664 INFO [STDOUT] returning False
    2012-11-20 19:25:42,797 INFO [STDOUT] ***********************User Created Succesfully****************************
    2012-11-20 19:25:42,848 INFO [STDOUT] **************************Employee Group**********XTNL Active
    2012-11-20 19:25:44,199 INFO [STDOUT] Running CREATEUSERINOIM
    2012-11-20 19:25:44,200 INFO [STDOUT] Target Class = com.pldt.adapter.createuser.CreateUserInOIM
    2012-11-20 19:25:44,200 INFO [STDOUT] ***********************Inside Create User****************************
    2012-11-20 19:25:44,212 INFO [STDOUT] =====================Before Date Insert===============
    2012-11-20 19:25:44,213 INFO [STDOUT] =====================hiredate===============1970-01-01
    2012-11-20 19:25:44,213 INFO [STDOUT] ***************************section***************XTNL Active
    2012-11-20 19:25:44,255 ERROR [XELLERATE.SERVER] Class/Method: tcUSR/verifyUserLogin Error :User Loginid is duplicate.
    2012-11-20 19:25:44,258 ERROR [XELLERATE.SERVER] Class/Method: tcUSR/eventPreInsert Error :User login is not correct.

  • Generate random number and letter in a text field ...

    Hi All,
    I having a bit trouble when trying to generate random number and letter in application express in a text field. Say I have a licence form and when user wants to create a licence, it will provide a random licence number in the licence number field but it has to be unique. the number should be something like HQ2345. I was trying to set the following sql in default value for that text field but it is not working -
    select DBMS_RANDOM.STRING('',2) || trunc(DBMS_RANDOM.VALUE(1000,9999))
    from dual;
    any suggesion !!!!
    thanks

    Put this as default value for your text-item
    DBMS_RANDOM.STRING('',2) || trunc(DBMS_RANDOM.VALUE(1000,9999))
    with type PL/SQL Expression. It have tested it and it works fine.
    DickDral

  • Generate Random number at VB6

    Thank you for reading below scenario:
    assume user will input 4 digits number to a text
    Input Number : 1119
    and I'll create a command button, after click on the command button it will generate above number
    Generate : 1119
    1191
    1911
    9111
    I did using "Randomize" but it generate the same number as result... .Can anyone give me an idea how to generate random number using Visual Basic as the above scenario?
    Thank's a lot

    The first thing to do is to rewrite in PHP.
    -- CJ

  • 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.

  • How to generate random password as per password policy by knowing the resou

    Hi,
    Any body tell me, how to generate random password as per password policy by knowing the resource object in OIM11g
    Regards,
    Nishith Nayan

    Hi Nayan,
    You can try below code snippet:
    UserRepository ur = new DBUserRepository();
    UserInfo user = ur.getUserInfo(userKey);     
                   ResourceRepository rrepo = new ResourceDBRepository();
                   Resource resource = rrepo.findResource(resourceName);
                   PasswordPolicyAssignmentsRepository par = new PasswordPolicyAssignmentsDBRepository();
                   PasswordPolicyRepository ppr = new DBPasswordPolicyRepository();               
                   List passwordPolicyAssignments = par.getPasswordPolicyAssigments(resource);     
                   PasswordPolicy passwordPolicy;     
                                            PasswordPolicyAssignment passwordPolicyAssignment = (PasswordPolicyAssignment) passwordPolicyAssignments.get(0);
                             if (isApplicable(passwordPolicyAssignment, getMappedAttributes(userInfo.getAttributes()))) {                            
                                  passwordPolicy = ppr.find(passwordPolicyAssignment.getPasswordPolicyID());                    
                                                 RandomPasswordGeneratorImpl rpg = new RandomPasswordGeneratorImpl();
                             password = rpg.generatePassword(userInfo, passwordPolicy);
    regards,
    gyan

  • Anyone know how to generate random midi in real time?

    Hi this is my first post so if this is obvious please forgive me
    I'm a John Cage fan and interested in chance generated working methods.
    What i'd like to know is if there is a way to generate random midi events (pitch and velocity) in logic pro or mainstage from an incoming midi signal e.g. any incoming note trigger could trigger any midi note randomly within a user defined range in real time?
    Also is it possible to generate random midi events by just letting something run in the background?
    NB i know i can randomise events after the fact using the transform window - i just can't work out how to randomise in real time.
    sorry if this was a dumb question but any help would be greatly appreciated
    thanks in advance

    christianobermaier wrote:
    Random notes are difficult because a MIDI Note actually consists of two events, Note On and Note Off a while later. If you transform either to something random, you'd get hanging notes all over the place especially when doing it live.
    You are quite right Christian, but I still think there are some ways to solve that in the Environment. For some reason I created such a tool in the pass ( it was a Logic custom offer or something like that ... ). I just converted this old LSO to L8 project. Here is a short description of the Macro "Elements" below:
    *INPUT NOTE RANDOMIZER - ELEMENTS*
    1."On/Off" CC# Assign box - you can set any CC# 0-127 here to control the Global ON/OFF Macro button(2) externally.
    2.Global ON/OFF Macro button - switches the Macro ON/OFF. In OFF mode the macro is bypassed.
    3.Note Pitch Low Randomization range box - determines the low range randomization value.
    4.Note Pitch Top Randomization range box - ( determines the top range randomization value ).
    5."Panic" CC# Assign box - you can set any CC# 0-127 here to control the "Panic" button (6) externally.
    6.Panic Button - resets any playing or hanging notes in both Macro ON/OFF modes.
    7.Note Velocity Low Randomization range box - determines the low range randomization value.
    8.Note Velocity Top Randomization range box - ( determines the top range randomization value ).
    Note: +There is a Stand Alone Macro layer in the template project so the macro tool can be easy imported as an Environment layer into other Logic projects. The tool is Polyphonic ( no Voice Limiter is applied ) so you can use it to generate random chords playing same chord rhythmically etc.+
    Also is it possible to generate random midi events by just letting something run in the background?
    I think so - something like Arpeggiator object may do the job as a Note generator in a combination with some Enviro gear or Macro...
    *Live Input Logic Note Randomizer v1.0* - [DOWNLOAD|http://audiogrocery.com/files/innote_randv1.0.zip]
    !http://img59.imageshack.us/img59/699/innoterand.gif!
    !http://img59.imageshack.us/img59/4967/aglogo45.gif!

  • 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?

Maybe you are looking for