OIM API to Provision Bulk Accounts via Reconciliation

package com.oimacademy.reconciliation;
import java.util.HashMap;
import java.util.Map;
import oracle.iam.reconciliation.api.EventAttributes;
import oracle.iam.reconciliation.api.ReconOperationsService;
import com.oimacademy.connection.Platform;
public class DisconnectedRecon { 
public static void main(String[] args) {
    try { 
     int i=5;
            ReconOperationsService recService = Platform.getService(ReconOperationsService.class);
            //Add Object Reconciliation Fields for resource Object. No Childern fields.
             Map<String, Object> mapKeyValue = new HashMap<String,Object>();   
             //For Dummy Connector
             mapKeyValue.put("Account ID","TUSER"+i);
            // mapKeyValue.put("Account Login","TUSER"+i);
             mapKeyValue.put("IT Resource","DisconnectedApp");
             mapKeyValue.put("Password","Welcome12");           
                EventAttributes eventAttr = new EventAttributes();
                eventAttr.setEventFinished(false);               
                long reconEventKey = recService.createReconciliationEvent("DisconnectedApp", mapKeyValue,eventAttr);           
                System.out.println("Recon Event ID -> "+reconEventKey);
                recService.finishReconciliationEvent(reconEventKey);
                //recService.processReconciliationEvent(reconEventKey);               
                //processing event
               //recService.callingEndOfJobAPI();   
                System.out.println("Completed Recon Event Operation -> "+reconEventKey);             
              }catch(Exception e){
                  e.printStackTrace();             
              } 
   }
}

No comments:

Post a Comment