- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2014 03:49 AM
Hi,
I have a workflow which requires 4 change tasks to be completed before moving to the next stage - see attachment.
Does anyone have a script that could help.
Thanks
Steve
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2014 07:44 AM
I would suggest to use join activity. It works the same way as you need it as per your problem description.
Utility Activities - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2014 07:58 AM
I use something similar to whatTim Black uses except I just check for active tasks. Also note it is good to check other types of records to see if they tasks are closed or not before processing.
//Query for all tasks to see if they are inactive
var rec = new GlideRecord('change_task');
rec.addQuery('change_request', current.sys_id);
rec.addQuery('active', true);
rec.query();
if(rec.hasNext()){
answer = false;
}
else{
//Continue
answer = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2014 08:03 AM
I do the same if i am waiting for ALL tasks to close.. in this case he stated he needed to wait for just those four tasks to close
i also see a parallel branch off of task 1.. so a normal join may not be reliable in this case.. which is why i suggested using workflow variables as tags.. and just wait for all for tags to go true.