Reconciliation Service
Java API
Getting The Reconciliation Service
ReconOperationsService reconOp = client.getService(ReconOperationsService.class);
Running a Trusted Reconcilliation to Xellerate User
// recordMap contains the keys and values that map from the Xellerate User resource to the Process Definition to the User Record
try {
eventKey = reconOp.createReconciliationEvent("Xellerate User", recordMap, true);
reconOp.processReconciliationEvent(eventKey);
logger.debug("Recon Complete " + eventKey);
}
catch (tcAPIException ex) {
logger.error("Recon Exception tcAPIException", ex);
}
Running a Target reconciliation with multiple Children
Here we are doing a Recon of users (Sailors) from the ldap server were each sailer can be assigned Groups and a Ship.
// recon is a map containing the attributes mapped from the resource object to the process definition to the process form
logger.debug("Recon Map " + recon);
try
{
// reconcile all the parent fields
long reconEvent = reconOp.createReconciliationEvent(resourceName, recon, false);
// reconcile each group using the parent event ID
for(String group : groups)
{
childgroup.clear();
childgroup.put(groupChildName, group);
logger.debug("recon Group " + childgroup);
long pk2 = reconOp.addMultiAttributeData(reconEvent, groupMV, childgroup);
}
// reconcile any ship assignments
for(String ship : ships)
{
childship.clear();
childship.put(shipChildName, ship);
logger.debug("recon Ship " + childship);
long pk2 = reconOp.addMultiAttributeData(reconEvent, shipMV, childship);
}
// if had groups then clear any previous groups and make these groups the current groups
if (groups.size() > 0)
reconOp.providingAllMultiAttributeData(reconEvent,groupMV,true);
// if had a ship then clear any previous ships and make this ship the current ship
if (ships.size() > 0)
reconOp.providingAllMultiAttributeData(reconEvent,shipMV,true);
// finish and process the target recon
reconOp.finishReconciliationEvent(reconEvent);
reconOp.processReconciliationEvent(reconEvent);
}
catch(Exception e)
{
logger.error("Recon Exception for " + recon);
}
page revision: 8, last edited: 28 Sep 2011 11:57