Name
sn_itom_licensing.HLACIReporterWithCountStore
Description
No description available
Script
var HLACIReporterWithCountStore = Class.create();
HLACIReporterWithCountStore.prototype = {
initialize: function() {},
process: function(sku) {
if (sku != 'itom' && sku != 'otm') {
gs.error(gs.getMessage("Error: Invalid value {0} for SKU. The value has to be either 'itom' and 'otm'"), sku);
return;
}
var itomLicensingUtils = new ITOMLicensingUtilsStore();
var HLA_VALUE_STREAM = 'HLA';
if (GlidePluginManager.isActive('sn_occ')) {
var skuGr = new GlideRecord('itom_lu_sku_type');
skuGr.get(sku);
//clean up existing records for application health and sku itom from itom_lu_licensable_cis table
itomLicensingUtils.cleanUpCIListingReport(HLA_VALUE_STREAM, sku);
try {
new HLALicenseReportPopulatorStore().populateReportTable(skuGr);
itomLicensingUtils.setCompletedStatusforListing(HLA_VALUE_STREAM, sku);
} catch (ex) {
gs.error("Error: Unable to run schedule job for HLA. Review the error message for more details - " + ex);
itomLicensingUtils.setStatusforListing(HLA_VALUE_STREAM, 'failed', sku);
}
} else {
gs.warn("Warning: Unable to run schedule job for HLA. Make sure you have the required plugin installed or activated.");
itomLicensingUtils.setStatusforListing(HLA_VALUE_STREAM, 'Skipped', sku);
}
},
type: 'HLACIReporterWithCountStore'
};
Sys ID
b4b0841b0f3c6110d3e56290b8767e3f