Auto-close Service Catalog tasks after certain period of time

shane_holland
Mega Contributor

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.

1 ACCEPTED SOLUTION

Something like Branch.png



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.


View solution in original post

8 REPLIES 8

In this case, you can use a branch activity in the workflow where one branch verifies the condition that all tasks are closed, in the other one, the timer could be running (say for ex : 5 days), which ever is acheived first which close the RITM workflow which will close REQ.


Something like Branch.png



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.


I understand now and will try it out - thank you for your guidance!


User140988
Kilo Guru

Also if you want to check the old data and close the tasks, then you can create a scheduled job, on demand and run it manually when you need it to close the task which will in turn close the task and trigger scripts to close the RITM and REQ, or you can schedule this schedule job and let it run may be weekly or monthly.