Name
global.DownloadPatternEntitiesAjax
Description
No description available
Script
var DownloadPatternEntitiesAjax = Class.create();
DownloadPatternEntitiesAjax.prototype = Object.extendsObject(AbstractAjaxProcessor, {
process: function() {
var trackerId = this.getParameter("sysparm_ajax_processor_tracker_id");
var patternList = this.getParameter("sysparm_ajax_processor_pattern_list");
var worker = new GlideScriptedHierarchicalWorker(); // We must open another script to keep track of it all
worker.setProgressName('Download all Pattern(s) Entities');
worker.setScriptIncludeName('DownloadPatternsEntities');
worker.setScriptIncludeMethod('process');
worker.putMethodArg('patternList', patternList);
worker.setBackground(true);
worker.setCannotCancel(true);
worker.start();
return worker.getProgressID();
},
// send the cancel by adding the cancel signal into the pattern export tracker
// result, so that the update set progress worker will catch it
sendCancelSignal: function(trackerId) {
var tracker = SNC.GlideExecutionTracker.getBySysID(trackerId);
tracker.updateMessage("Canceling pattern download process...");
result = {'export_cancel_requested': 'true'};
tracker.updateResult(result);
return;
},
type: 'DownloadPatternEntitiesAjax'
});
Sys ID
690b34d153330010234dddeeff7b126f