spaces.internet2.edu has been upgraded to Confluence 6.6.0. If you have any questions and/or concerns, please contact us at websupport@internet2.edu
Skip to end of metadata
Go to start of metadata

The Person Update service of the Entity Registry accepts incoming attributes, attempts to resolve a Person based on those attributes, and modify the found Person's attributes using the information given.

Pseudocode

  function Registry.handleUpdate(incomingAttributes) {
  /* if the incoming attributes already contain a registry-assigned unique id, try to resolve the person, and fail if can't */
  if(incomingAttributes.contains(registry_assigned_unique_id) {
    var currentPerson = registry.getPerson(registry_assigned_unique_id);
    if(!currentPerson) {
      throw PersonNotFound_Exception;
    }
    currentPerson.replaceAttributes(incomingAttributes);
    return currentPerson;
  }
  
  /* otherwise we must run a search-match to find a matching person */
  else {
    var matches = PersonMatchService.findMatchesByAttributes(incomingAttributes);
    if(matches.size() == 1) {
      currentPerson = matches.getNext();
      currentPerson.replaceAttributes(incomingAttributes);
      return currentPerson;
      
    } else if(matches.size() > 1) {
      var matchResolutionTicket = MatchResolutionQueue.enqueue(new WorkItem(matches, incomingAttributes))
      return matchResolutionTicket;
      
    } else if(matches.isEmpty()) {
      var newPerson = createNewPerson(incomingAttributes)
    }
    
  }

}

 

  • No labels