- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 10:38 AM
The requirement is to check to see if all the tasks are closed . Not sure what the script would be like:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2017 10:44 AM
This is the script I'm using:
ifScript();
function ifScript() {
var t = new GlideRecord('sc_task');
t.addNotNullQuery('order');
t.addQuery('request_item',current.sys_id);
t.addQuery('active',true);
t.query();
if(t.hasNext()){
answer = false;
}
else{
//Continue
answer = true;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:53 PM
If the ad-hoc tasks have values in both request_item and active (or any other fields that you're querying on), then I would suggest adding logging on the script to see which records it's identifying. Can you also provide an image of the workflow leading up to and after your wait condition? Preferably one that proceeded even with active ad-hoc tasks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 03:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2017 06:13 AM
Did adding logging to your wait for condition script give you any clues to what it has found as the tasks are closed?