Tip #1251: Run workflow when something did not happen

Flow is all the rage these days but there are some scenarios where classic workflow still rules. Classic workflow has the uncanny ability to readjust itself when underlying data you’re waiting for, changes.

This dialog took place not so long ago:

Steve “Reads his own blog” Mordue: I want to trigger a workflow to update an account record if a case has not been created in the last 30 days for the account. Any ideas?

Yours truly: So let me get this straight… You want to run a workflow when something does not happen. That’s a new one.

SM: Yes

YT: How about this.

  1. Create a field on account ‘Last case created on’. Have a workflow that fills that in with the current date on case create.
  2. Have another workflow waiting on that field that kicks in 30 days after the date. It will readjust itself as the field gets updated.

SM: I like it

Just to be fair. If you have bazillions of the accounts and quantamarillions of cases, you might end up with a large number of waiting workflows. Some people have beef with that so those might want to consider Guido “Future olive farmer” Preite‘s suggestion of a scheduled Azure Function to perform the check every day. GP did admit that it was a developer’s suggestion meaning that SM ignored it.

Cover photo by unsplash-logoAnthony Ginsbrook

6 thoughts on “Tip #1251: Run workflow when something did not happen

  1. Oswin says:

    Another viable option, which doesn’t use waiting workflows nor Azure functions, would be to use MS Flow to daily query for accounts that have a gap of 30 days between the last case and the current date.

    • Are you sure you can build “query for accounts that have a gap of 30 days between the last case and the current date” in Flow? Sounds extremely challenging.
      For a single account I suppose you could do top 1 from cases sorted desc by createdon but all of them? Plus you might hit the record limits.
      All in all, Azure Functions, Logic Apps, and Flow would all be similar – a process that checks the data on a regular basis.

Leave a Reply

Your email address will not be published. Required fields are marked *