The CreatorCon Call for Content is officially open! Get started here.

Can a task be closed automatically?

sonita
Giga Guru

The client's requirement:   If x = Informational then Open task and automatically close. My question: Can a task be closed automatically in the workflow?

As far as I know , the user can close the task manually , not sureif   a task   can be closed   automatically

1 ACCEPTED SOLUTION

Hi Soni,


Absolutely. You mentioned you were building this into the workflow. so if that's the case after your 'Create Task' step, the next Step would be a 'Run Script'. In this Run Script you set the state value for the task (just created) to 'Closed Complete'.



Job done.



I'd also check to see if there is any other information like close notes etc to be captured.



Please mark this response as correct and helpful via your post link (Can a task be closed automatically? ) to help others with the same question.



Thanks,


Robbie


View solution in original post

9 REPLIES 9

Robbie
Kilo Patron
Kilo Patron

Hi Soni,


Using a simple 'Set values' or 'Run Script' object/condition (Found under the 'core' tab) will allow you to do this. You'll just need to set the State value to Closed Complete (or respective value you require).


Are there any conditions that need to be met in order to close the task? I would assume so, either way, these can also be handled pragmatically and allow you to close the task.



Please mark this response as correct and helpful via your post link (Can a task be closed automatically? ) to help others with the same question.



Thanks,


Robbie


Shahed Shah1
Tera Guru

When a user closes a task in the UI, they are usually setting the "state" via the drop-down or via a "UI Action", which triggers a Business Rule to set the "active" field to false.



Assuming you will have an IF activity, you can route to a "Script" activity that can create a task and set the active field to false (as well as the respective state field). Is this what you are thinking of? That would be doable.


Yes , if the if condition is true I need to open a task and automatically close it. So based on what you suggest I create a catalog task and then create a run script and set active to false?


That's pretty much the flow I was thinking.



If you want, since you're going to have it closed straight away, it is possible to reduce the number of steps and not use the Create Task activity. So the actual creation as well as closing it (setting active to false) can be done in one script, within the Run Script activity.