Workflow Instance deleted without been cancelled

JMA 20 Reputation points
2025-03-17T14:57:15.4+00:00

Hi,

We are facing an issue where someone accidentally deleted a workflow without canceling it first, and it is now still running in the background with state = '2' (SQL server). The Nintex team has advised us to contact Microsoft Support.

Since I am new to this, could you please guide me on how to reach the support team? Alternatively, is there any other method to cancel or delete the running instance?

I would appreciate any thoughts or suggestions.

Thanks

SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
661 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,781 Reputation points Microsoft External Staff
    2025-03-18T01:49:48.7933333+00:00

    Whether you use SharePoint designer workflows or Nintex workflows?

    If you use SharePoint designer workflows, you could try to use PowerShell to terminate a workflow instance.

    Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue  
       
    $web = Get-SPWeb "http://your-sharepoint-site-url"  
       
    #Get the List  
    $list = $web.Lists["Your-List-Name"]  
       
    #Get the specific workflow, Associated with the list  
    $WorkFlowToCancel = "your workflow name"  
       
    # Iterate through all Items and all Workflows on Items  
    foreach ($item in $list.Items)  
    {  
       foreach ($wf in $item.Workflows)  
         {  
            #Check for the particular workflow  
            if( ($wf.ParentAssociation.Name -eq $WorkFlowToCancel) -and ($wf.IsCompleted -ne $true) -and($wf.StatusText -ne "Canceled"  ))  
            {  
                write-host "Previous workflow status:"  $wf.InternalState  
                #Cancel Workflow  
                [Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf)       
                write-host "Workflow Cancelled at $($list.title)! "  
            }  
         }  
    }
    

    If you use Nintex workflows, it is recommended that you contact Microsoft Customer Support Services (CSS) via telephone (a dedicated Support Professional can assist you in a more efficient manner) to confirm whether the Microsoft support team supports Nintex workflow issues.

    Please go to the website to find related number and call it to create a new Phone Service Request to Microsoft Phone Support team. As remind, you might be charged for phone support service.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.