Query the Nintex Database for Workflows based on state

Blog Post created by Support on Apr 21, 2015

You can use the following SQL query to find workflows inside the Nintex Content database based on their state. Simply modify the "WHERE" argument to look for workflows in other states.


SELECT DISTINCT i.workflowname, i.webid, i.siteid, i.listid, p.CurrentActivityTitle, p.TimeStamp
FROM dbo.workflowinstance i
  inner join WorkflowProgress P
  on I.InstanceID = P.InstanceID
WHERE i.State = '2'


Here are the different states you can query:

when 2 then 'Running'

when 4 then 'Completed'

when 8 then 'Cancelled'

when 64 then 'Error'



Andrew Beals