5

I'm using the oracle OIM 11g api (in packages oracle.iam). I use the class oracle.iam.platform.OIMClient to get all the OIM client services like UserManager.

I need to find the resources got with the provisioning workflows. Which service can I use? How can I do with the OIM api?

Chaitanya K
  • 1,827
  • 4
  • 32
  • 67
Fabio Strocco
  • 300
  • 4
  • 14

1 Answers1

3

The method below should export all resources into an XML file-

public Boolean export() {
    Boolean result = true;
    String export_object="Resource";
    try {
       FileWriter fstream = new FileWriter("OIMResources.xml");
       BufferedWriter out = new BufferedWriter(fstream);
       tcExportOperationsIntf moExportUtility = (tcExportOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcExportOperationsIntf");
       Collection<RootObject> lstObjects = moExportUtility.findObjects(export_object, "*");
       System.out.println(lstObjects);
       lstObjects.addAll(moExportUtility.getDependencies(lstObjects));
       lstObjects.addAll(moExportUtility.retrieveChildren(lstObjects));
       lstObjects.addAll(moExportUtility.retrieveDependencyTree(lstObjects));
       String s = moExportUtility.getExportXML(lstObjects, "*");    
       out.write(s);
       LOG.info(Resource + "Objects successfully exported");
       out.close();
   } catch (Exception e) {
        LOG.log(Level.SEVERE, "Exception occured while exporting OIM object" + Resource, e);
     }
   return result;
 }
Anjan Biswas
  • 7,746
  • 5
  • 47
  • 77