Name

global.ExampleScriptedWorker

Description

Example of a scripted worker that runs in the background and can have a progress worker associated with it Sample invocation would be var worker = new GlideScriptedProgressWorker(); worker.setProgressName( Example Scripted Worker ); worker.setName( ExampleScriptedWorker ); worker.addParameter( Made it to the start ); worker.setBackground(true); worker.start(); gs.setRedirect( example_scripted_worker_refresh.do?sysparm_pworker_sysid= + worker.getProgressID());

Script

var ExampleScriptedWorker = Class.create();

ExampleScriptedWorker.prototype = {
initialize : function() {
},

process: function(startMsg) {
   worker.addMessage(startMsg);
}
}

Sys ID

d8e084970a0a0b6900f5b913ac165150

Offical Documentation

Official Docs: