Deleting Workflow Processes Best Practices

We are trying to figure out how to delete workflow processes that were halted at mid stream for internal business reasons. When we tried deleting the workflow we get the message / Error "Workflow cannot be deleted. Its used in workflow related_id "xxxxx". 

Question is: How does one delete the Relationships of any related item that is tied to the actual workflow? Looking for some specific examples on how we can accomplish this. 

Any help would be appreciated. If possible an AML sample would also go a long way in trying to resolve this issue.

Thanks in advance for your support.

    William E. 

  • The Normal would be to cancel the workflow, not delete it...  Item.apply("CancelWorkflow"). This will have the added benefit of not removing the traceability to see when the workflow was halted.

    If you are determined to delete a workflow, I would suggest running the where used query on it to see all the references that must be removed.

    Many thanks