code: @Override
      public boolean purgeJobInstance(long jobInstanceId) throws JobSecurityException, NoSuchJobInstanceException {
          if (authService != null) {
              authService.authorizedJobPurgeByInstance(jobInstanceId);
          }
  
          //save this instance object to use in the publishEvent call.
          WSJobInstance jobInstance = persistenceManagerService.getJobInstance(jobInstanceId);
  
          boolean purgeSuccess = persistenceManagerService.purgeJobInstanceAndRelatedData(jobInstanceId);
  
          if (purgeSuccess) {
              publishPurgeEvent(jobInstance);
          }
          return purgeSuccess;
      }
docs: {@inheritDoc}