Monday, October 9, 2017

OIM 11g PS3 Code Sample to Reconcile Multiple Child Attributes

When I was recently writing a custom code for  reconciling multiple columns of a child table from a home grown product for a customer, I faced few problems. I faced this issue may be because I was writing recon code for multiple multi data attributes for the first time ☺. Just to help you guys I am sharing the sample code of that portion which may trouble you:



  if (childData != null && childData.size() > 0) {
                       ignoreData =reconOper.ignoreEventAttributeData(resourceObjectName,parentData,childDataMultiValReconFieldName,
                                                                                        (Map[])childData.toArray(new Map[childData.size()]));
                                    } else {
                                        logger.info("--------------inside else------------------------------ " );
                                        ignoreData =reconOper.ignoreEvent(resourceObjectName,parentData);
                                                                  
 //Please pay your attention here

if (!ignoreData) {
       
                                    logger.info(classname + methodName +
                                                 "Going to submit recon event creation request");
       
                                    EventAttributes eventAttributes = new EventAttributes();
                                  
                                    eventID = reconOper.createReconciliationEvent(resourceObjectName,parentData,eventAttributes);

                                   
                                    if (eventID > 0) {
   
                                    if (childData != null &&
                                        !childData.isEmpty()) {
                                        logger.info("Child Data: " +
                                                    childData.toString());
// do not use  reconOper.providingAllMultiAttributeData() function


logger.info(classname + methodName +"addDirectBulkMultiAttributeData Initiated..");
   
                                        reconOper.addDirectBulkMultiAttributeData(eventID,childDataMultiValReconFieldName,childData,databaseDateFormat);
                                      
                                        logger.info(classname + methodName + "addDirectBulkMultiAttributeData Completed Successfully..");
   
                                           
} else {
   
logger.logp(Level.SEVERE, classname,methodName,"No child data reconciled ");
                                    } 
                                    reconOper.finishReconciliationEvent(eventID);

// In th end process the recon event generated
reconOper.processReconciliationEvent(eventID);


No comments:

Post a Comment

OIM 11g PS3 Code Sample to Reconcile Multiple Child Attributes

When I was recently writing a custom code for  reconciling multiple columns of a child table from a home grown product for a customer, I fa...