Scoped equivalent of GlideScriptedProgressWorker()?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2016 06:05 PM
GlideScriptedProgressWorker is not callable from a scoped script.
I have looked through the documented Scoped API and cannot find anything comparable.
Has anyone come across a workaround/equivalent?
I'm currently using a global script to call the Progress worker which runs scoped code but this is not ideal, as I cannot package it on the store.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 03:57 AM
Hi Paul,
I don't know whether you are already doing this, but you need to specify the scope when calling global scripts and scripts defined in other apps..
var switches = new global.ArrayUtil();
switches.contains(ary, item);
Source: Scripting in Scoped Applications - ServiceNow Wiki
Best Regards,
Miriam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2016 04:51 PM
Some scripts can't be called even with the global prefix.
Unfortunately this is one of those cases 😕
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2016 12:22 AM
Oh no. =/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2020 01:35 AM
Hello Paul,
I know it's a thread from past, but were you able to use the GlideScriptedProgressWorker? I'm working on a scoped application which needs the progress worker to be used, I tried with
var worker = new GlideScriptedHierarchicalWorker();
worker.setProgressName("***");
worker.setScriptIncludeName('***');
worker.setScriptIncludeMethod("***");
worker.putMethodArg("***",***);
worker.putMethodArg("***",***);
worker.setBackground(true);
worker.start();
But when I try to use the "worker" object in the above mentioned SI, I'm not able to get the reference for the worker object.
Can you provide any inputs?
Any help is appreciated.
Regards
Omkar Mone