I'm having some trouble figuring if I can have a workflow figure out when it was last run (or if it has ever been run). The scenario is this: I want the workflow to be run periodically and check a database for new entries. The simplest thing to do is to have the workflow run every five minutes and query the database for rows created in the last five minutes. The problem there is what happens if the workflow can't run or contact the database for a while?
So, what I would like to do is have the workflow do the following:
What I can't seem to figure out is how to ask when the last time a workflow was run. I'm guessing that I'm missing something very obvious.
Thanks!
For each workflow execution, there are various properties that include the variable values and start and stop times.. while you could iterate through to find the last execution and extract the dates, the much easier way - and the way I have done in the past is like this:
The overall thing (simplified) would look similar to this:
If you find this to be a reasonable solution that meets your needs, please be sure to give my reply credit