Pages

Friday, July 13, 2012

tcReconciliationOperationsIntf API Example

The tcReconciliationOperationsIntf inteface API being used to create the Reconciliation Event in the Oracle Identity Manager repository.

Pre-Requisite:


Initial Setup.

Please follow the link and setup the OIM client environment to use to create the OIM Objects.

Client Code Setup


tcReconciliationOperationsIntf API Usage:

The following tasks needs to be performed to create the reconciliation event in the Oracle Identity Manager. They are

1.    Create the OIMClient Handle


OIMClient client= new OIMClient();
client.login(username,password.toCharArray());

2.    Get tcReconciliationOperationsIntf service object


tcReconciliationOperationsIntf recon= client.getService(tcReconciliationOperationsIntf.class);

3.   Build the Reconciliation Data Resource Account


Map parentdata= new HashMap();
parentdata.put("First Name","xxf") ;
parentdata.put("Last Name","xxf") ;
parentdata.put("Middle Name","xxf") ;
parentdata.put("User Id","xxf") ;
parentdata.put("It Resource",IT Resource Key) ;
parentdata.put("Status","Enabled") ;

4.   Build the Reconciliation Child Data Resource Account


 Map childarr[]= new Map[2];

Map childdata1= new HashMap();
childdata1.put("Depart Ment","Sales") ;


Map childdata2= new HashMap();
childdata2.put("Depart Ment","Sales") ;


childarr[0]=childdata1;
childarr[1]=childdata2;



4.    Verifying the Reconciliation Event Creation


String resourceName="Resource Name";
boolean raiseevent=recon.ignoreEvent("Resource Name",parentdata);

boolean childevent=recon.ignoreEventAttributeData(resourceName,parentdata,"Maulivalued Attribute Name",childarr);

5.    Creating Reconciliation Event


long reconkey=-1
if(raiseevent || childevent)
{
   reconkey= recon. createReconciliationEvent(resourceName,parentdata,false);
}

6.    Creating Child Reconciliation Event


if(reconkey !=-1)
{
     if(childevent)
    {
       for(Map childMap:childarr)
       {
           recon.addDirectMultiAttributeData(reconkey, "Maulivalued Attribute Name", childMap);
        }
         recon.providingAllMultiAttributeData(reconkey, "Maulivalued Attribute Name", true);
    }
}

7.    Completing the Reconciliation Event


recon.finishReconciliationEvent(reconkey);

1 comment: