A "The workflow 'SampleWorkflowName' cannot be deleted because there are still running instances. [0178-WF1]" Error Occurs When Deleting a Workflow.

October 6, 2016 | KB: 1013800
Workflow 10

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.

  1. Open the Workflow Administration Console and select the Workflow Server Node > Advanced Diagnostics > Persisted Instances > Workflow You Want To Delete node.
  2. Select on the instances you want to delete and then click Delete in the actions pane.
  3. Optional: Click Delete All to delete all instances of the workflow.
  4. Retry deleting the appropriate Workflow definition.