@Override
  public List<StudentCourseRecordInfo> resolve(
      Map<String, Object> resolvedPrereqs, Map<String, String> parameters)
      throws TermResolutionException {

    DateTime startTime = new DateTime();

    ContextInfo context =
        (ContextInfo) resolvedPrereqs.get(RulesExecutionConstants.CONTEXT_INFO_TERM.getName());
    String personId =
        (String) resolvedPrereqs.get(RulesExecutionConstants.PERSON_ID_TERM.getName());
    String versionIndId =
        (String) resolvedPrereqs.get(RulesExecutionConstants.CLU_VERSION_IND_ID_TERM.getName());

    List<StudentCourseRecordInfo> records = null;
    try {
      records =
          getAcademicRecordService()
              .getStudentCourseRecordsForCourse(personId, versionIndId, context);
    } catch (Exception e) {
      KSKRMSExecutionUtil.convertExceptionsToTermResolutionException(parameters, e, this);
    }

    DateTime endTime = new DateTime();
    RegEnginePerformanceUtil.putStatistics(
        RegEnginePerformanceUtil.TERMS, getOutput(), startTime, endTime);

    return records;
  }
  @Override
  public Boolean resolve(Map<String, Object> resolvedPrereqs, Map<String, String> parameters)
      throws TermResolutionException {
    ContextInfo context =
        (ContextInfo) resolvedPrereqs.get(RulesExecutionConstants.CONTEXT_INFO_TERM.getName());
    String personId =
        (String) resolvedPrereqs.get(RulesExecutionConstants.PERSON_ID_TERM.getName());

    boolean coursesWithGrade = true;

    try {
      // Retrieve the list of cluIds from the cluset.
      String cluSetId =
          parameters.get(KSKRMSServiceConstants.TERM_PARAMETER_TYPE_COURSE_CLUSET_KEY);
      String gradeType = parameters.get(KSKRMSServiceConstants.TERM_PARAMETER_TYPE_GRADE_TYPE_KEY);
      String grade = parameters.get(KSKRMSServiceConstants.TERM_PARAMETER_TYPE_GRADE_KEY);

      List<String> versionIndIds = this.getCluIdsForCluSet(cluSetId, parameters, context);
      if (versionIndIds != null && !versionIndIds.isEmpty()) {
        for (String versionIndId : versionIndIds) {
          if (!this.checkCourseWithGrade(
              personId, versionIndId, grade, gradeType, parameters, context)) {
            coursesWithGrade = false;
          }
        }
      } else {
        coursesWithGrade = false;
      }
    } catch (Exception e) {
      KSKRMSExecutionUtil.convertExceptionsToTermResolutionException(parameters, e, this);
    }

    return coursesWithGrade;
  }