def activityToType(jobActivity):
    """
    Function to map a workflow activity to a generic CMS job type.
    :param jobActivity: a workflow activity string
    :return: string which it maps to

    NOTE: this map is based on the Lexicon.activity list
    """
    activityMap = {"reprocessing": "production",
                   "production": "production",
                   "relval": "production",
                   "harvesting": "production",
                   "storeresults": "production",
                   "tier0": "tier0",
                   "t0": "tier0",
                   "integration": "test",
                   "test": "test"}
    return activityMap.get(jobActivity, "unknown")