OIM 11g: Event Handlers/Plugins Classpath

We have a number of custom utility libraries that we use for OIM development which are currently uploaded to the OIM database OIMHOME_JARS table.
Ideally, we'd like to reference classes from these JARs in our plugins/event handlers. During initial testing, it looks like the plugin code doesn't consider the uploaded JARs and we get a bunch of NoClassDefFoundError errors.
Is there no way to get the plugin code to be able to use the uploaded utilities? or is the solution to also deploy the utility JARs within the plugin zip file itself (not ideal).
Thanks.

Not always true. In most of the cases you would find that it reads the helper jars from within the lib directory inside the plugin but in some special cases it does't behave that simple.
UploadJars definitely doesn't work. I had to put the jar in the weblogic startup script to set classpath for this to work. This script is *<domain_home\bin\setDomainEnv.cmd\>*
So its a bit dubious.

Similar Messages

  • OIM 11g: Event Handler Packaging/Deployment

    Need some advice/guidance on best practices for packaging/deploying Event Handlers in OIM 11g.
    In our OIM 9.1 environment, we organized all of our custom code by "functional area" so we have JAR's named oim-common.jar, oim-ad.jar, oim-oid.jar, etc. Within each one of these JAR's we have all adapter code, scheduled tasks, and 10g event handlers related to that area. This approach was done to promote code reuse and make unit testing easier.
    From what I've read on 11g Event Handlers, it sounds like each event handler needs to be packaged as a plugin along with it's own JAR so that we'd have one JAR per event handler. So, if we have 100 event handlers, we'd need 100 JAR's? Is this required or can our plugin ZIP files just contain the XML definitions as long as the referenced classes are on the classpath?

    Gyanprakash Pandey wrote:
    You should have a separate plugin package for each event handler. Practically we should have number of event-handlers as less as possible. If there are more event-handlers we must modify the design as event handler cause performance issues.
    Regards,
    GPHi Gyanprakash,
    I'm going to use event handlers in my project, so I'm interested very much in hearing about the performance issues.
    Besides, I do not see why I shall package every handler separately. Is this intended behavior or because of some bugs in OIM?
    Regards,
    Vladimir

  • OIM 11g PreProcess Handlers

    Hi,
    I am developing a logic for UserID Generation using PreProcess Handlers. I am using the following code snippets for generating UserID.
    ====================================================
    import oracle.iam.identity.usermgmt.api.UserManager;
    import oracle.iam.platform.authz.exception.AccessDeniedException;
    import oracle.iam.platform.entitymgr.vo.SearchCriteria;
    public class CustomUserIDGeneration implements UserNamePolicy {
    public String getUserNameFromPolicy(Map map) {
    //Get FirstName and Last Name of the User Account
    printMap(map);
    FirstName = ((String)map.get("First Name"));
    LastName = ((String)map.get("Last Name"));
    public boolean isUserNameValid(String username, Map map) {
    System.out.println((new StringBuilder()).append("MyCustomUserNameGenerator####isUserNameValid: username=").append(username).toString());
    printMap(map);
    List<String> userLogins = new ArrayList<String>();
    UserManager usrService = oimClient.getService(UserManager.class);
    Set<String> retAttrs = new HashSet<String>();
    retAttrs.add(UserManagerConstants.AttributeName.USER_LOGIN.getId());
    SearchCriteria criteria = new SearchCriteria("User ID", UserID2Search, SearchCriteria.Operator.EQUAL);
    =======================================================================
    While searching for the User ID exists in OIM or not, i am getting the below error.
    oracle.iam.platform.authz.exception.AccessDeniedException: You do not have permission to search the following user attributes: User ID.
    I am logging as "xelsysadm" user in the code.
    If i use OIM 10g "findAllUsers()" API, I am able to generate the USERID and validate against the OIM. But when i am using 11g API's i am not able to complete. Can somebody help me on this.
    Urgent help is highly appreciated.
    Thanks,
    SandeepD
    Edited by: user13476138 on Jul 12, 2011 11:45 AM

    Thank you for your reply. I just need some more clarifications. I need to populate 'User Login', with a generated username. Are you populating this field as well? This field is mandatory in oim 11g. I am unable to change it to be non-mandatory.
    I did change the Default Policy for username, and set it to the plugin I implemented.
    Here the steps I followed:
    1- Created the Java class
    2- Created plugin.xml
    3- Created zip file then registered plugin.
    4- Updated the Default User Name Policy.
    Am I missing any steps??
    Again thank you for all your help...

  • OIM 11g: Event Handler "Data Object"

    Is there any way in the OIM 11g Users event handler model (pre-insert) to get a "data object" type structure of the column names and values which will be inserted into the database (i.e USR_FIRST_NAME = "John"). This would be similar to what the legacy 9.1x event handler model provided via the getDataObject() method.
    I know how to get the data from the orchestration parameters, but for our requirements we need the data to be keyed by database column name ("USR_FIRST_NAME") and not field name as in the orchestration params ("First Name").
    OIM must do this conversion at some point (field name -> database column name). Can we somehow leverage this same function?
    Thanks.

    You can accomplish through if statements in your event handler to check for the attributes that determine the logic. For example, if your user's last name changes, you can check the orchestration.getParameters() to see if it contains a key for "UserManagerConstants.AttributeName.LAST_NAME.getId()" and if it does, then perform your logic to update the user.
    You could also come up with a lookup that can be referenced for these and have your own custom java code that outputs information based on the values in the lookup. Just think creatively and anything is possible.
    Or you can get a connection to the database, and have a constants file that translates the metadata names back to database fields and continue to use your existing code.
    Lots of options.
    -Kevin

  • How to Deploy the Event Handlers OIM 11g

    Hi
    I have developed the code for post process event handler using OIM 11 G API. The OIM not invoking the EventHandlers while updating the users attribute or creating the users attribute.
    I have done the following task to develop and deploy the OIM 11g Event handlers. They are
    1) Implementing the PostProcessHandler interface and provide the implementation of execute method.
    Sample Class
    public class SamplePostProcessEventHandler implements PostProcessHandler {
         private Logger logger=Logger.getLogger("TEST-LOGGER");
         public SfsuPostProcessEventHandler()
              logger.debug("Invoking Event Handler Plugin");
         @Override
         public boolean cancel(long arg0, long arg1,
                   AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              return false;
         @Override
         public void compensate(long arg0, long arg1,
                   AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
         @Override
         public EventResult execute(long processid, long eventid, Orchestration orchestration) {
              // TODO Auto-generated method stub
              logger.debug("Operation "+orchestration.getOperation());
              logger.debug("Parameters "+orchestration.getInterEventData());
              logger.debug("Parameters "+orchestration.getParameters());
              EventResult result=new EventResult();
              return result;
         @Override
         public BulkEventResult execute(long arg0, long arg1, BulkOrchestration arg2) {
              // TODO Auto-generated method stub
              return null;
         @Override
         public void initialize(HashMap<String, String> arg0) {
              // TODO Auto-generated method stub
    2) Create the Jar File SamplePostProcessEventHandler.jar
    3) Create the Plugin.xml file
    Sample File
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="test.eventhandlers.SamplePostProcessEventHandler" version="1.0" name="SamplePostProcessEventHandler">
    </plugin>
    </plugins>
    </oimplugins>
    4) Create the directory lib and copy the SamplePostProcessEventHandler.jar file into this directory
    5) Creating the Zip file with the following directory structure.
    plugin.xml
    lib/SamplePostProcessEventHandler.jar
    6) Register the plugin
    ant -f pluginregistration.xml register
    7) Creating the Custom Events xml file called EventHandlers.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers>
    <action-handler class="test.eventhandlers.SamplePostProcessEventHandler" entity-type="User" operation="CREATE" name="SamplePostProcessEventHandler" stage="postprocess" order="LAST" sync="TRUE"/>
    <action-handler class="test.eventhandlers.SamplePostProcessEventHandler" entity-type="User" operation="MODIFY" name="SamplePostProcessEventHandler" stage="postprocess" order="LAST" sync="TRUE"/>
    </eventhandlers>
    8) Importing the Above XML into the MDS Schema Using the weblogicImportMetadata.sh file
    Directory Structure of the Event Handler Schema File
    /home/oracle/eventhandler/db/EventHandlers.xml
    weblogic.properties file parameters
    wls_servername=oim_server1
    application_name=oim
    metadata_from_loc=/home/oracle/eventhandler
    9) Finnally Running the PurgeCache.sh All
    10) Restarted the OIM Server.
    11) Testing
    I have logged into the OIM Admin Console >> Search the User > Update the First Name. The event handlers are not invoked any create or update operation. I am not able to see the log entries into the log file.
    My Log Entry Configuration.
    log File Configuration :
    /u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/config/fmwconfig/servers/oim_server1/logging.xml
    <log_handler name='test-handler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='logreader:' value='off'/>
    <property name='path' value='/u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/servers/oim_server1/logs/test-event.log'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='locale' value='en'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    <logger name="TEST-LOGGER" level="FINEST" useParentHandlers="false">
    <handler name="test-handler"/>
    <handler name="console-handler"/>
    </logger>
    Is there anything is missing while deploying the event handlers.
    Help is Greatly appreciated.

    Change as per the following :
    1. Put the event hander in the /home/oracle/eventhandler /metadata/metadata directory and
    2. Change the following in the weblogic properties
    application_name=OIMMetadata
    metadata_from_loc to =/home/oracle/eventhandler/metadata
    This will work.

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • OIM 11G plugin

    Hi
    I am developing plugin in OIM 11g but my plugin is not executing since it is in queue waiting for other plugin (developed by someone else) to execute, which got failed and stuck in queue. Can anybody tell me how to execute my plugin without waiting for the other one which is above my plugin in orchorder? Deleting the entry or changing the orchorder doesn't work.
    Below is the table in which plugin status can be seen..
    select * from orchevents WHERE processid=643 ORDER BY orchorder;
    Result(not all columns pasted)
    ID     NAME               STATUS          
    3635     ReconUserPasswordHandler     FAILED          
    3630     SetUserNameAndEmailID     NOTSTARTED

    Right... turns out you need to use the domain lib folder for anything like this. Just pop your libs in their and everything should have access to them.

  • Get IT Resouce  details in OIM 11g class

    Hi All,
    I'm new to OIM 11g and I need to get IT Resource Details in event handler code.In Earlier oim 9x version,I used to get this by using
    Hashtable hashtable = tcUtilXellerateOperations.getITAssetProperties(dataProvider, itResourceName);
    Same need to know in OIM 11g
    one more doubt,In oim 11g assets Event hanlder xml is like below and Postprocess-hanlder defined.
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    *<postprocess-handler* class="oracle.iam.assets.eventhandlers.ContractorIDPostProcEventHandler" entity-type="User" operation="CREATE" name="ContractorIDPostProcEventHandler" stage="postprocess" sync="TRUE" order="100"/>
    </eventhandlers>
    in a blog http://fusionsecurity.blogspot.in/2011/09/oim-11g-event-handler-example.html, action-handler mentioned.
    <?xml version="1.0" encoding="UTF-8"?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    *<action-handler* class="oracle.iam.demo.eventhandlers.UserDirectorEventHandler" entity-type="User" operation="CREATE" name="UserDirectorUpdate" stage="postprocess" order="1000" sync="FALSE"/>
    </eventhandlers>
    Which one we need to use while developing event handler.
    Thanks in advance
    Regards,
    Krish

    I'm new to OIM 11g and I need to get IT Resource Details in event handler code.In Earlier oim 9x version,I used to get this by using
    Hashtable hashtable = tcUtilXellerateOperations.getITAssetProperties(dataProvider, itResourceName);
    Same need to know in OIM 11gThis might help
    Thor.API.Operations.tcITResourceInstanceOperationsIntf itr = Platform.getService(Thor.API.Operations.tcITResourceInstanceOperationsIntf.class);
    HashMap hashmap = new HashMap();
    hashmap.put("IT Resources.Name", itresourcename);
    tcResultSet rss = itr.findITResourceInstances(hashmap);
    Long ll = rss.getLongValue("IT Resource.Key");
    System.out.println("IT Resource key***************** "+ ll);
    tcResultSet itResourceParams = itr.getITResourceInstanceParameters(ll);
    int count = itResourceParams.getRowCount();
    for(int i=0; i<count; i++)
    itResourceParams.goToRow(i);
    System.out.println("Parameter Name:::::: "+ itResourceParams.getStringValue("IT Resources Type Parameter.Name"));
    System.out.println("Parameter Value:::::: "+ itResourceParams.getStringValue("IT Resource.Parameter.Value"));
    //Compare the IT Resource parameter name and get the parameter value

  • OIM 11g LDAP sync from different LDAP containers

    Hi,
    I have been setting up OIM 11g R2 (11.1.2) to use LDAP Sync to OID.
    As of now the sync works (both ways) for this container:
    cn=users,cn=oracleAccounts,dc=mycompany,dc=com (configured while doing the OIM config)
    Would it be possible to sync users in other containers as well? For example:
    cn=users,cn=otherAccounts,dc=mycompany,dc=com
    cn=users,cn=moreAccounts,dc=Otherstuff,dc=com
    By editing the file LDAPContainerRules.xml I can setup where the users are created when I create them through IDM.
    But that will not make the sync work for those containers.
    Any ideas where I should start to accomplish the above?
    Thanks & Regards,
    Henrik

    Okay, I think I have found an answer to how to sync users from different OU:s in my OID to different OIM organizations.
    Hopefully this will help others.
    We can use a PostProcess Event handler like this:
    1. Implement the method --> public BulkEventResult execute()
    This is used during recon actions.
    2. Get the user hashmap with attributes and set the "act_key" value with the OIM organizations ID.
    You also needs to build the logic to fetch the users "LDAP DN", which is also fetched from the map.
    From that attribute we can decide which Organization to put the user in.
    This is the best solution we have found yet..
    Docs & tips:
    http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/oper.htm#CCHFBGAA
    http://fusionsecurity.blogspot.se/2011/09/oim-11g-event-handler-example.html (thank you Daniel Gralewski)
    Regards,
    Henrik

  • Event Handlers OIM 11g

    Hi Folks ,
    I am very new to OIM 11g , Could you please help me on below :
    I have a OIM system, i want to see what all event handlers are present in OIM . Could you please tell me where can i go and look to find out the event handlers in my
    OIM instance .
    Thanks
    P

    OimWannaBe wrote:
    Thanks i will go through the links .., just one more question :
    In 11g , creating normal process task adapters /scheduled tasks , does it involve all the plugins stuff etc .., or they are like 10 g and plugins comes in to picture when we create event handlers .No, process task adapters are the same old way, just that you need to upload the jar into the db rather than copying them. Other than that everything else needs plugins atleast.
    Other Ques :
    Is it possible to create pre process/pre insert Event handlers in OIM 11g for trusted reconciliation . I heard somewhere that 11g doesnt support pre insert event handlers for trusted recon , is it ?Yep you heard it right, you cannot have event handlers during 11g recon pre process.
    Thanks
    Preeti.Edited by: Bikash Bagaria on Dec 29, 2011 10:39 PM

  • Event Handlers Invoked Everytime for update on User Profile.(OIM 11g)

    Hi,
    We had Custom event handlers for generating some fields on user form.
    Everytime there is update on user profile on any field, All the event handlers fired, (As seen from logs).
    I want to fire particular event handlers on particular update. Like if first name is updated then only display name event handler should fire. (not all)
    How can i achieve this???

    Here is my code..it is working fine for creation of the user. but when i am updating the user i am getting all null values except the updated one.
    Example if there are 5 fields in that i am updating 2 .apart from those 2 fields the other 3 are coming as null which is making validation to fail.
    package flatfilevalidation;
    import java.io.Serializable;
    import java.util.Date;
    import java.util.HashMap;
    import oracle.iam.platform.context.ContextAware;
    import oracle.iam.platform.kernel.ValidationException;
    import oracle.iam.platform.kernel.ValidationFailedException;
    import oracle.iam.platform.kernel.spi.ValidationHandler;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.Orchestration;
    import oracle.iam.identity.usermgmt.api.UserManagerConstants.AttributeName;
    import Thor.API.*;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Operations.*;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Set;
    import oracle.iam.identity.usermgmt.api.UserManagerConstants;
    import oracle.iam.identity.usermgmt.vo.User;
    import oracle.iam.passwordmgmt.utils.MLSUtils;
    import oracle.iam.platform.Platform;
    import oracle.iam.platform.kernel.vo.OrchestrationTarget;
    import oracle.iam.upgrade.changes.jaxb.Entity;
    public class FFValidation implements ValidationHandler {
    int count;
    tcUserOperationsIntf userOperationsService;
    Entity ent = null;
    @Override
    public void validate(long arg0, long arg1, Orchestration orchestration)
    throws ValidationException, ValidationFailedException {
    System.out.println("entered the Validation methode");
    HashMap<String, Serializable> parameters = orchestration.getParameters();
    System.out.println("****************************************************************");
    User user = getUser(orchestration);
    Object passwdOrchParam = parameters.get(UserManagerConstants.AttributeName.EMPLOYEE_NUMBER.getId());
    System.out.println("***************************"+passwdOrchParam+"*************************************");
    System.out.println("orch.getParameters() ============================ " + parameters);
    String ceo="CEO";
    String trainee="Trainee";
    String Emp="EMP";
    String Contractor="Contractor";
    //int Skypecount,Empcount,phonecount;
    String Role= getParameterValue(parameters, "Role");
    String Designation = getParameterValue(parameters, "Designation");
    Long Manager =getManagerid(parameters, "USR_MANAGER_KEY");
    Date EndDate =getDate(parameters, "End Date");
    String EmpNo=getParameterValue(parameters, "Employee Number");
    String skypeid=getParameterValue(parameters, "SkypeId");
    String Mobile=getParameterValue(parameters, "Mobile");
    String skypeidDb="usr_udf_skypeid";
    String MobileDb="usr_mobile";
    String EmpDB="usr_emp_no";
    //validating SkypeID
    uniquevalidate(skypeid,skypeidDb);
    //Validating Employee Number
    uniquevalidate(EmpNo,EmpDB);
    //Validating Employee Number
    uniquevalidate(Mobile,MobileDb);
    //CEO Validation
    if(Designation.equals(ceo)){
    if(Manager!=null){
    String msg="ManagerID not required";
    System.out.println("ManagerID not required ");
    throw new ValidationFailedException(msg);
    //Cotractor Validation
    if(Role.equals(Contractor) && Designation.equals(ceo)) {
    System.out.println(Designation.equals(ceo));
    String msg="Contractor Cannot be CEO";
    System.out.println("Contractor Cannot be CEO");
    throw new ValidationFailedException(msg);
    if(Role.equals(Contractor)&& EndDate==null) {
    String msg="Contractor Endate is not provided";
    System.out.println("Contractor Endate is not provided");
    throw new ValidationFailedException(msg);
    //Trainee Validation
    if(Role.equals(trainee) && Designation.equals(ceo)) {
    System.out.println(Designation.equals(ceo));
    if(Designation.equals(ceo)) {
    String msg="Trainee Cannot be CEO";
    System.out.println("Trainee Cannot be CEO");
    throw new ValidationFailedException(msg);
    //manager validation
    if(!Designation.equals(ceo)){
    if(Manager==null){
    String msg="ManagerID Can not be Null";
    System.out.println("ManagerID Can not be Null");
    throw new ValidationFailedException(msg);
    //Employee Validation
    if(Role.equals(Emp)){
    if(EndDate!=null) {
    String msg="Employee End Date Should be empty";
    System.out.println("Employee End Date Should be empty");
    throw new ValidationFailedException(msg);
    @Override
    public void validate(long arg0, long arg1, BulkOrchestration arg2)
    throws ValidationException, ValidationFailedException {
    System.out.println("**************Inside BulkOrchestration****************");
    HashMap<String, Serializable> parameters = arg2.getParameters();
    System.out.println("orch.getParameters() ============================ " + parameters);
    @Override
    public void initialize(HashMap<String, String> arg0) {
    private String getParameterValue(HashMap<String, Serializable> parameters,
    String key) {
    String value = (parameters.get(key) instanceof ContextAware) ? (String) ((ContextAware) parameters
    .get(key)).getObjectValue()
    : (String) parameters.get(key);
    System.out.println("VALUE::" + value);
    return value;
    private boolean isNullOrEmpty(String str) {
    return str == null || str.isEmpty();
    private Long getManagerid(HashMap<String, Serializable> parameters,
    String key) {
    System.out.println(parameters);
    Long managerLogin = (parameters.get(AttributeName.MANAGER_KEY.getId()) instanceof ContextAware)
    ? (Long) ((ContextAware) parameters.get(AttributeName.MANAGER_KEY.getId())).getObjectValue()
    : (Long) parameters.get(AttributeName.MANAGER_KEY.getId());
    System.out.println("managerLogin "+managerLogin);
    return managerLogin;
    private Date getDate(HashMap<String, Serializable> parameters,
    String key) {
    System.out.println("date "+ parameters);
    Date date = (parameters.get(AttributeName.ACCOUNT_END_DATE.getId()) instanceof ContextAware)
    ? (Date) ((ContextAware) parameters.get(AttributeName.ACCOUNT_END_DATE.getId())).getObjectValue()
    : (Date) parameters.get(AttributeName.ACCOUNT_END_DATE.getId());
    System.out.println("EndDate "+date);
    return date;
    void uniquevalidate(String idvalue,String idDbvalue){
    userOperationsService = Platform.getService(tcUserOperationsIntf.class);
    HashMap<String, String> UMAttr = new HashMap<String, String>();
    String msg="Entered Value is not unique" + idvalue;
    System.out.println("idvalue="+ idvalue);
    System.out.println("idDbvalue="+ idDbvalue);
    if(idvalue!=null){
    try {
    System.out.println("in try block");
    UMAttr.put(idDbvalue, idvalue);
    tcResultSet USAttr = userOperationsService.findUsers(UMAttr);
    System.out.println(USAttr);
    System.out.println("User set count ========================= " + USAttr.getRowCount());
    count=USAttr.getRowCount();
    if(count>0)
    throw new ValidationFailedException(msg);
    catch (tcAPIException e) {
    e.printStackTrace();
    private User getUser(Orchestration orchestration)
    if(orchestration.getTarget() != null && orchestration.getTarget().getEntityId() != null)
    return new User(orchestration.getTarget().getEntityId());
    HashMap orchParams = orchestration.getParameters();
    User user = new User(null);
    Set orchParamNames = orchParams.keySet();
    String orchParamName;
    for(Iterator i$ = orchParamNames.iterator(); i$.hasNext(); user.setAttribute(orchParamName, orchParams.get(orchParamName)))
    orchParamName = (String)i$.next();
    MLSUtils.setStringValuesForMLSAttributes(user);
    System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"+user);
    return user;
    }

  • USER LOGIN GENERATION USING EVENT HANDLER IN OIM 11G

    Hi
    I am looking to generate user logins in OIM 11g (11.1.1.5) using event handlers. Can anyone guide me with the process and which API need to be used?
    Regards

    You have to write your custom class which implements oracle.iam.identity.usermgmt.api.UserNamePolicy. Then you have to register the plugin which will contain the plugin.xml and class file of your custom code.
    More in this metalink ID 1228035.1

  • Custom Pre Process Event Handler in OIM 11g for middle initials

    Hi,
    I am trying to congiure a Custom Pre Process Event Handler for generating middle name in OIM 11g and I am following the steps as given in metalink ID: *1262803.1*
    Even after successfully performing all the steps I am not able to get the middle initials in Admin Console when I create a new user.
    1) Directory structure for the application that I have created through JDeveloper.
    CustomApplication/
    |-- CustomApplication.jws
    `-- CustomProject
    |-- CustomProject.jpr
    |-- classes
    | `-- com
    | `-- example
    | `-- custompph
    | `-- CustomPreProcessEventHandler.class
    `-- src
    `-- com
    `-- example
    `-- custompph
    `-- CustomPreProcessEventHandler.java
    2) Directory structure for Plugins directory
    My Plugin.xml :
    <?xml version="1.0" encoding="UTF-8" ?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="com.example.custompph.CustomPreProcessEventHandler"
    version="1.0" name="CustomPreProcessEventHandler" />
    </plugins>
    </oimplugins>
    plugin/
    |-- lib
    | `-- com
    | `-- example
    | `-- custompph
    | `-- CustomPreProcessEventHandler.class
    |-- middlename.zip
    `-- plugin.xml
    Copied the middlename.zip in the plugin folder in OIM_HOME and registered it successfully.
    3) Created a EventHandlers file and imported it successfully using importmetadata.
    My EventHandlers.xml:
    <?xml version='1.0' encoding='utf-8'?>
    <eventhandlers>
    <!-- Custom preprocess event handlers -->
    <action-handler
    class="com.example.custompph.CustomPreProcessEventHandler"
    entity-type="User"
    operation="CREATE"
    name="CustomPreProcessEventHandler"
    stage="preprocess"
    order="10"
    sync="TRUE"/>
    </eventhandlers>
    I checked the logs as well but could not find something which can help me to proceed.
    Also please advise is their any mapping that I need to do in *"Design Console"*
    Please advise !!!!!
    Thanks

    My lib file contains the package as mentioned in the metalink.
    Heirarchy in Plugin folder :
    1) plugin.xml
    2) Lib ( lib contains 3 folders : com/example/custompph; And inside custompph is my CustomPreProcessEventHandler.class file)
    You mean to say i should not copy the entire package in lib but only the jar file of the CustomPreProceessEventHandler.class* file.
    If i put only a .jar file in lib i get the following error.
    "Error occured during the use of plugin registering utility. The plugin zip does not contain the definition of plugin class com.example.custompph.CustomPreProcessEventHandler"
    Thanks
    Edited by: 870050 on Jul 4, 2011 4:30 AM

  • Unregister Event Handler OIM 11g

    Hi
    I have created a event handler and registered the same within OIM 11g. it gets executed as expected after create user (post process). next i changed some of the code within my custom event handler. and registered the plugin after i unregistered the old one. unfortunately i still see the old output in my logs
    i have purged the metadata chache, i have bounced the OIM but no luck..
    Are there any steps / checks i need to follow after i unregister the event handler.. and also plz confirm whether we need to follow all the steps of registration of event handler every time we make changes to the event handler class. uhhh.. its really time consuming when
    thanks
    shiv

    Hi,
    Please make sure you are shipping updated JAR files in plugin.zip and re-register.
    Follow below steps to re-register plugin,
    1.     Unregister plugin using below command
    ant -f pluginregistration.xml unregister
    2.     Prepare plugin.zip with updated JAR file.
    3.     register plugin using below command
    ant -f pluginregistration.xml register
    You do not need to restart OIM server after re-register and need not to import eventhandler.xml unless you change version of plugin.
    Also you can verify registered plugin details in plugin table with following query (Run on OIM DB),
    select * from plugins;
    Thanks,
    Pradeep.

  • Debuging Event Handler OIM 11g

    Hi experts
    I have built the event handler and its able to set email of the end user as [email protected] after post process. Fortunatly i could do this at first shot after following the link on the oracle meta link.
    But i could not debug the eventhandler class file for any additional changes. though i have added the SOP statments i cud not see anythin in the OIM Diagnostic logs.
    can any one help me where i can find the trace out put of the SOP's i've set in the event handler.. is it in the WLS logs or do i need to set the OIM log level to finest. im lil confused
    this is the first time im dealing with oim event handlers.

    Hi ,
    By default SOP statments prints on OIM logs.
    You can generate Custom Log file in OIM 11g for event handler.
    1.Open logging.xml from <OIM Domain>/config/fmwconfig/servers/<OIM Server>
    2.In the <log_handlers> tag add entry for custom handler
    3.Add entry for the custom logger under <loggers> tag
    4.Restart the OIM server
    For more details, please see link http://docs.oracle.com/cd/E21764_01/doc.1111/e14308/log.htm#CEGEAGIB .
    Thanks,
    Pradeep
    Edited by: Pradeep Khopade on Jan 30, 2012 10:23 PM
    Edited by: Pradeep Khopade on Jan 30, 2012 10:24 PM

Maybe you are looking for

  • After Effects 7.0 Professional won't install on Mac

    Hi guys, trying to install AE 7.0 Professional via a disc package I bought on Amazon.  I keep getting this error message.  I have OS X 10.9.4, with 3.4 ghz intel core i5 processor and lots of memory.  Don't know how to get past this error message.  I

  • What is the shortcut to insert rows in Numbers?

    I know I can use the arrow on the row number to insert rows, but I need to insert a bunch of rows.  What is the keyboard shortcut to insert rows?  I don't understand what the screen tip says is the shortcut. Thanks for your help

  • How to bring up Number pad

    Hi All, Building an app for a client and one screen features a simple calculator, everything works fine but when you click on the input field it bring ups the iphone keypad you are then forced to select the number pad and only then you are able to in

  • OIM 11gR2 study material

    Hi, Any pointers on OIM 11gR2 study material. Thanks :)

  • Crash on opening a new project in Premiere  [..\..\Core\PropertiesImpl.cpp-641]

    I get this error every time I try to open a new project in Premiere  [..\..\Core\PropertiesImpl.cpp-641] what is the problem?