Summary
When you try to delete a workflow, you may receive the following error message:
The workflow 'SampleWorkflowName' cannot be deleted because there are still running instances. [0178-WF1]
You receive the above error message even though no instances of the workflow definition are found when doing a search in the Laserfiche Workflow Designer.
Cause
This situation can arise if there was an incomplete cleanup of the database. A search may return no running instances, but there may be residual data. For example, the Workflow service not being shut down cleanly could cause there to be inconsistent data.
Workaround
In the Workflow Administration Console, use the Persisted Instances node under Advanced Diagnostics to view all instance data and delete instances. The Persisted Instances node uses a different method for querying instance data.