3 Replies Latest reply: Nov 16, 2012 6:25 AM by Karthik Perath RSS

    get IT Resouce  details in OIM 11g class

    880250
      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
        • 1. Re: get IT Resouce  details in OIM 11g class
          Karthik Perath
          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
          This 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
          }
          • 2. Re: get IT Resouce  details in OIM 11g class
            Karthik Perath
            If you write custom event handler, you have to use action-handler in the eventhandler xml.

            Check this for more details. http://docs.oracle.com/cd/E27559_01/dev.1112/e27150/oper.htm#BGBCAHED
            • 3. Re: get IT Resouce  details in OIM 11g class
              880250
              Thanks karthik.WIll try & let you know.

              Regards,
              Krish