Auto close LEC case when all TO do task's are completed

phanendra varma
Tera Contributor

We have a requirement where we need to auto close the case when all the Task's related to parent case is completed.

No for cases it can be done easily but For LEC cases we don't not know when all the task's will be triggered because we do have some situations where some task's need to trigger after 60 days from the time LCE case Got Triggered.

 

So here how will the BR/some script know that all the tasks related to this LCE case's got trigged and not Activity sets are waiting to trigger? 

Even in table 'sn_hr_le_activity_set_context' the state of an activity set remains in Awaiting trigger until the trigger type condition is satisfied.

The main issue here is we have some activity sets for which the trigger type is either condition/combination or Advanced. Here for example for conditional based activity set is based on some field value in case and if that condition is not satisfied and it will not get satisfied at all, so even in this scenario the state of the activity set is still in awaiting trigger.  How will the script know that we need to close the case as there is no pending activity sets to trigger.

 

Regards

Varma

3 REPLIES 3

Uncle Rob
Kilo Patron

Something must be telling the system in what cases it should launch those "in 60 days" tasks.
That decision must be data driven somehow.
So you build those conditions into whatever object (business rule, flow, etc) you're using to auto-close.

Kohei Tominaga1
Tera Expert

I'm not sure I could understand your situation, but there is an OOTB auto-close functionality.

KoheiTominaga1_0-1709775949473.png

For more details, you can check Docs article
https://docs.servicenow.com/bundle/washingtondc-employee-service-management/page/product/human-resou...

 

Best Regards,

Kohei

Sandeep Rajput
Tera Patron
Tera Patron

@phanendra varma The easiest way out would be to set the Automatically close case check box to true on the HRService form.

 

Screenshot 2024-03-07 at 8.02.12 AM.png