old_contents: from events.event import EventBase
  from events.models import PersonLog
  from restclients.models.sws import PersonModel
  from sis_provisioner.loader import load_user
  from sis_provisioner.models import PRIORITY_IMMEDIATE
  from events.exceptions import EventException
  
  
  class Person(EventBase):
      """
      Collects Person Change Event described by
  
      """
  
      # Enrollment Version 2 settings
      SETTINGS_NAME = 'PERSON_V1'
      EXCEPTION_CLASS = EventException
  
      #  What we expect in a v1 enrollment message
      #  _eventMessageType = 'uw-student-registration'
      #   eventMessageVersion = '1'
  
      # What we expect in a v2 enrollment message
      _eventMessageType = 'uw-person-change-v1'
      _eventMessageVersion = '1'
  
      def process_events(self, event):
          current = event['Current']
          previous = event['Previous']
          net_id = current['UWNetID'] if current else previous['UWNetID']
          if not net_id:
              self._log.info('PERSON NULL UWNetID: %s' % (
                  current['RegID'] if current else previous['RegID']))
              return
  
          # Preferred name, net_id or reg_id change?
          if not (previous and current) or \
             current['StudentName'] != previous['StudentName'] or \
             current['FirstName'] != previous['FirstName'] or \
             current['LastName'] != previous['LastName'] or \
             current['UWNetID'] != previous['UWNetID'] or \
             current['RegID'] != previous['RegID']:
              load_user(PersonModel(uwregid=current['RegID'],
                                    uwnetid=net_id,
                                    first_name=current['FirstName'],
                                    surname=current['LastName'],
                                    full_name=current['StudentName']),
                        priority=PRIORITY_IMMEDIATE)
  
      def record_success(self, event_count):
          self.record_success_to_log(PersonLog, event_count)
  
new_contents: from events.event import EventBase
  from events.models import PersonLog
  from restclients.models.sws import PersonModel
  from sis_provisioner.loader import load_user
  from sis_provisioner.models import PRIORITY_IMMEDIATE
  from events.exceptions import EventException
  
  
  class Person(EventBase):
      """
      Collects Person Change Event described by
  
      """
  
      # Enrollment Version 2 settings
      SETTINGS_NAME = 'PERSON_V1'
      EXCEPTION_CLASS = EventException
  
      #  What we expect in a v1 enrollment message
      #  _eventMessageType = 'uw-student-registration'
      #   eventMessageVersion = '1'
  
      # What we expect in a v2 enrollment message
      _eventMessageType = 'uw-person-change-v1'
      _eventMessageVersion = '1'
  
      def process_events(self, event):
          current = event['Current']
          previous = event['Previous']
          net_id = current['UWNetID'] if current else previous['UWNetID']
          if not net_id:
              self._log.info('PERSON NULL UWNetID: %s' % (
                  current['RegID'] if current else previous['RegID']))
              return
  
          # Preferred name, net_id or reg_id change?
          if not (previous and current) or \
             current['StudentName'] != previous['StudentName'] or \
             current['FirstName'] != previous['FirstName'] or \
             current['LastName'] != previous['LastName'] or \
             current['UWNetID'] != previous['UWNetID'] or \
             current['RegID'] != previous['RegID']:
              load_user(PersonModel(uwregid=current['RegID'],
                                    uwnetid=net_id,
                                    first_name=current['FirstName'],
                                    surname=current['LastName'],
                                    display_name=current['StudentName']),
                        priority=PRIORITY_IMMEDIATE)
  
      def record_success(self, event_count):
          self.record_success_to_log(PersonLog, event_count)
  
subject: load user with display_name