- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 09:24 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 10:01 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 09:29 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 09:33 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 09:39 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 09:53 AM
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.