Is it possible to programatically delete finished workflow runs (executions/tokens) for a given workflow? I've got a scheduled workflow that runs every hour and would like for the workflow itself to prune it's own history to only the last few completed runs in order to keep the number of completed workflow tokens from growing out of control.
The screen shot looks like the general client user preferences. I don't see any settings that would affect the number of workflow runs maintained in the database. The only one that comes close is "Size of run logs (number of lines)", but that only affects the number of lines displayed in the client when on the schema/log view. I see there is a manual way to delete all workflow runs in the web admin under the troubleshooting tab (Delete all workflow runs), but this is manual process and applies to all runs for every workflow.