Waiting condition workflows are definitely great and almost perfect for the functionality where you have to wait for months for something to be triggered.
but are they really good ; should actually keeping them alive for months is a good idea? Well there are certain measures that you can take if you really need them :
- Combine waits and check condition. So you have a process that emails a customer service representative three days after the case is open. No need to email them if the case has been closed, right? After the wait, have the workflow check conditions to verify that the condition that triggered the workflow is still true. If not, cancel , but stop it.
- Use a child workflow to do something when wait time is over.
- Use short wait periods. 20 minute waits are ok. 1 year waits are bad.
- Use timeouts rather then wait condition.
however apart from the above there is another way which can be effective in terms of your organization performance.
Create an entity to keep the crucial date or timestamps on which you want to do something.
- create an entity(workflow task) , with fields as “regarding” & “Due date”.
- In your workflow – if you need to do something for example 20 days before the expiration date – calculate that date and create a a new record for the entity created(workflow task) with regarding as the current record and the date in due date field.
- Stop your workflow – just end it right there.
- Create a bulk delete job -that you should run everyday which checks for the records who’s due date is today and delete them.
- Create a workflow on the new entity created(workflow task) – run it on deletion of the record and do the actual things you wanted to on your record from that workflow for example closing the activity , sending email etc.
Best thing about this approach this that you can continue using this logic in your organization with n number of records & entities.
let me know your thoughts on this.