OIM API To Recon Disconnected Resources


  1. package com.oimacademy.reconciliation;
  2. import java.util.HashMap;
  3. import java.util.Map;
  4. import oracle.iam.reconciliation.api.EventAttributes;
  5. import oracle.iam.reconciliation.api.ReconOperationsService;
  6. import com.oimacademy.connection.Platform; 
  7. public class DisconnectedRecon {  
  8. public static void main(String[] args) {
  9.     try {  
  10.      int i=5;
  11.             ReconOperationsService recService = Platform.getService(ReconOperationsService.class);
  12.             //Add Object Reconciliation Fields for resource Object. No Childern fields.
  13.              Map<String, Object> mapKeyValue = new HashMap<String,Object>();     
  14.              //For Dummy Connector
  15.              mapKeyValue.put("Account ID","TUSER"+i);
  16.             // mapKeyValue.put("Account Login","TUSER"+i);
  17.              mapKeyValue.put("IT Resource","DisconnectedApp");
  18.              mapKeyValue.put("Password","Welcome12");            
  19.                 EventAttributes eventAttr = new EventAttributes();
  20.                 eventAttr.setEventFinished(false);                
  21.                 long reconEventKey = recService.createReconciliationEvent("DisconnectedApp", mapKeyValue,eventAttr);             
  22.                 System.out.println("Recon Event ID -> "+reconEventKey);
  23.                 recService.finishReconciliationEvent(reconEventKey); 
  24.                 //recService.processReconciliationEvent(reconEventKey);                
  25.                 //processing event
  26.                //recService.callingEndOfJobAPI();     
  27.                 System.out.println("Completed Recon Event Operation -> "+reconEventKey);               
  28.               }catch(Exception e){
  29.                   e.printStackTrace();              
  30.               }   
  31.    }
  32. }package com.oimacademy.reconciliation;
  33. import java.util.HashMap;
  34. import java.util.Map;
  35. import oracle.iam.reconciliation.api.EventAttributes;
  36. import oracle.iam.reconciliation.api.ReconOperationsService;
  37. import com.oimacademy.connection.Platform; 
  38. public class DisconnectedRecon {  
  39. public static void main(String[] args) {
  40.     try {  
  41.      int i=5;
  42.             ReconOperationsService recService = Platform.getService(ReconOperationsService.class);
  43.             //Add Object Reconciliation Fields for resource Object. No Childern fields.
  44.              Map<String, Object> mapKeyValue = new HashMap<String,Object>();     
  45.              //For Dummy Connector
  46.              mapKeyValue.put("Account ID","TUSER"+i);
  47.             // mapKeyValue.put("Account Login","TUSER"+i);
  48.              mapKeyValue.put("IT Resource","DisconnectedApp");
  49.              mapKeyValue.put("Password","Welcome12");            
  50.                 EventAttributes eventAttr = new EventAttributes();
  51.                 eventAttr.setEventFinished(false);                
  52.                 long reconEventKey = recService.createReconciliationEvent("DisconnectedApp", mapKeyValue,eventAttr);             
  53.                 System.out.println("Recon Event ID -> "+reconEventKey);
  54.                 recService.finishReconciliationEvent(reconEventKey); 
  55.                 //recService.processReconciliationEvent(reconEventKey);                
  56.                 //processing event
  57.                //recService.callingEndOfJobAPI();     
  58.                 System.out.println("Completed Recon Event Operation -> "+reconEventKey);               
  59.               }catch(Exception e){
  60.                   e.printStackTrace();              
  61.               }   
  62.    }
  63. }

No comments:

Post a Comment