Products: Nintex Workflow 2016, Nintex Workflow 2013, Nintex Workflow 2010
A common cause of workflow failure is size. Additionally, large workflows can cause widespread performance issues in your SharePoint farm. This article provides instructions on how to locate large workflows.
Run the below (attached as well as a *.txt file for your convenience) PowerShell script (PowerShell ISE works well) from a SharePoint Server:
PowerShell Script |
---|
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue
#Workflows that are larger (in Kb) than threshold will be returned.
function Get-WorkflowFolders {
function Get-WorkflowData{ PARAM WorkflowSize = [Int]0 } $SPFolder.Files | ForEach-Object{$obj.WorkflowSize += [Int]$_.Length} $obj $SPFolder = $null }
$(Get-SPWebApplication) | Get-SPSite -Limit ALL | Get-SPWeb -Limit ALL | Get-WorkflowFolders | Get-WorkflowData | where {$_.WorkflowSize -gt $($threshold * 1024)} | FT Url, WorkflowSize |
The size of workflows returned can be adjusted by modifying the $threshold variable (default is 500 or 500kb).