Nintex Connect

The Official Community Site for Nintex Software Products, including Nintex Workflow 2007, 2010 and 2013; Nintex Workflow for Project Server 2010; Nintex Reporting 2008 and Nintex Analytics 2010; Nintex Forms 2010; Nintex Live and Nintex SmartLibrary.
Welcome to Nintex Connect Sign in | Join | Help
in Search

How to cancel/kill all running workflows on a site / site collection / farm

Last post 03-18-2010, 6:07 AM by JamesTyzack. 2 replies.
Sort Posts: Previous Next
  •  03-17-2010, 9:12 PM 9483

    How to cancel/kill all running workflows on a site / site collection / farm

    Hi all

     

    We have succesfully migrated our production sharepoint database back to our test environment, including nintex databases. 

    It works great, however...

     

    It turns out that we have a problem with hundreds of active approval workflows that of course lives on in the test environment. That is not very useful to us, and I would like to cancel/kill all of those running workflows.

    How? Is that possible?

     For now I've just removed the mailserver from the Nintex settings, so we don't spam too many CEOs (yes we have many) about approvals.

     

    Please don't tell me that I have to go through every running WF to cancel it. If need be tell me where to modify the DB...

     

    Kind regards

    Søren

     

     

     

  •  03-17-2010, 11:36 PM 9486 in reply to 9483

    Re: How to cancel/kill all running workflows on a site / site collection / farm

    Using brute force:


    begin tran

    update WorkflowInstance
    set state = 4 --completed
    where state =2 --running/errored

    --CHECK!
    commit tran

     

    It works. Look like still running in SharePoint, but not in Nintex. Good enough for me. 

     

  •  03-18-2010, 6:07 AM 9509 in reply to 9486

    Re: How to cancel/kill all running workflows on a site / site collection / farm

    Hi soerennielsen,

    Yes, the Nintex Workflow database doesn't control the state of workflows, it just reports on them. Changing the data here will change what is displayed in any Nintex page.

    To actually bulk terminate workflows, you would need to use the SharePoint to terminate them (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowmanager.cancelworkflow.aspx)

    cheers

    James

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems