TOPICWorkflows from deleted sites, site collections or web applications will still be present in the database but will not be displayed. If there were any "In-Progress" instances, these instances will be shown in the "Workflows In Progress (all sites)" report. This may affect performance as the number of records retrieved by the stored procedure might be greater than what the user needs to see and from a user’s perspective the workflow is deleted, they have no use for it.
INSTRUCTIONSSteps to remove orphaned workflows
- Check the "WorkflowInstances" table to confirm the workflow instance ID of the workflow instance that needs to be removed.
- Run the below script replacing "INSTANCEID" with the workflow instance ID obtained in step 1 above.
SET State = 4
WHERE WorkflowInstanceId = 'INSTANCEID'
WorkflowInstanceId = 'instanceID'