What's the best approach to determine the last time a workflow process ran?

I’m doing an audit to determine which processes we can safely remove. Should I just parse all the ppw log files for each WPROC entry? Or with Connect is this data available in the database, accessible with a REST call, for example?

Your Workflow logs are potentially unreliable, as they are cleaned every 10 days by default. So if the process ran 11 days ago, you wouldn’t see it and may delete it in error.

Likewise with the Connect information, data is only stored for 24 hours by default. So you’re not likely to get a good answer from that. You also would have a hard time tracking that back to a particular process, I would think, since you’d need to know information about the data that passed through the process (field values in datamapper, record IDs, etc). If you knew this, you’d already know if a job ran recently.

If you want to do this, what I would recommend is to create a small sub process that outputs a log of the calling process name, date and time. Using %w from a sub will tell you the name of the process that called it. So you can call that sub from each of your processes and let the data accumulate for a month or so. Once you’ve gathered a sufficient sample, you can begin to prune.