code: @Override
      public void workUnitCompleted(BatchWorkUnit workUnit) {
  
          long jobExecutionId = workUnit.getRuntimeWorkUnitExecution().getTopLevelExecutionId();
  
          if (workUnit instanceof BatchJobWorkUnit) {
  
              if (executingJobs.containsKey(jobExecutionId)) {
                  executingJobs.remove(jobExecutionId);
                  if (logger.isLoggable(Level.FINE)) {
                      logger.fine("job completed: For jobExecId = " + jobExecutionId + ", removed job work unit");
                  }
              } else {
                  // Perhaps we could throw an exception, but not sure what the point would be except to generate and FFDC
                  if (logger.isLoggable(Level.FINE)) {
                      logger.fine("job completed: For jobExecId = " + jobExecutionId + ", but didn't find job work unit to remove");
                  }
              }
  
          } else {
  
              SubWorkUnitComparisonHelper comparisonHelper = new SubWorkUnitComparisonHelper(workUnit);
  
              if (executingSubWorkUnits.containsKey(comparisonHelper.comparisonKey)) {
                  if (logger.isLoggable(Level.FINE)) {
                      logger.fine("subjob completed: For jobExecId = " + jobExecutionId + ", removed subjob work unit");
                  }
                  executingSubWorkUnits.remove(comparisonHelper.comparisonKey);
              } else {
                  if (logger.isLoggable(Level.FINE)) {
                      logger.fine("subjob completed: For jobExecId = " + jobExecutionId + ", but didn't find job work unit to remove");
                  }
              }
          }
      }
docs: /*
  This errs on the side of cleaning things up too readily without issue errors.
  Perhaps along with this we should be issuing messages in certain conditions, like
  if we are expecting to find something in here that's not here, or if the partition-level
  unit completes after the job-level unit has already been cleaned up (though perhaps there's nothing
  to do in such a case since things are well on their way to ending.