- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 07:31 AM
How would I go about setting something up (Business Rule, something else?) that will auto-close all open Tasks from the Service Catalog (sc_task) after a certain duration of time? Our workflows are set to complete the entire REQ after all tasks are closed. I suspect this would look at the Request Status to ensure it is not "Work In Progress" or "Pending". We are noticing fulfillers are performing the work but not consistently closing the actual task and it is skewing data showing REQ being open, when in reality they've been completed for quite some time.
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 07:55 AM
Something like
Also adding in the workflow will not ensure that the old tasks are closed, there you still have to do a cleanup via business rule or scheduled job (one time run) to clean up existing ones, and then the workflow should take of the new items.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 07:36 AM
Hi Shane,
If you are using workflow to create the catalog tasks(which most likely will be the case), you can add a timer there to wait for certain time or wait for a condition and then close the task , which in turn will complete the workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 07:42 AM
We do have a Wait For Condition in our workflow:
var rec = new GlideRecord('sc_task');
rec.addQuery('request_item', current.sys_id);
rec.addQuery('active', true);
rec.query();
if(rec.hasNext()){
answer = false;
}
else{
//Continue
answer = true;
}
How would I add in something time-based to that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 07:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2014 07:49 AM
Chandana - would I use this instead of the Wait For Condition we are using now? The current wait for will wait until all tasks are closed. I guess what I would need is an OR condition somewhere -- wait a certain amount of time OR wait until all tasks are marked Closed, whichever comes first.