aaron.labiosa@nintex.com

Speed up workflow processing with PowerShell

Blog Post created by aaron.labiosa@nintex.com Champion on Feb 18, 2016

Products: Nintex Workflow 2013, Nintex Workflow 2010

 

WARNING: THIS SHOULD NEVER BE USED IN A PRODUCTION ENVIRONMENT

 

When working on a workflow in a development environment it is often desirable to run through many instances of a workflow under various conditions. If the workflow utilizes pauses, this can be quite cumbersome when testing. This PowerShell script can be run on a development server to force the Workflow Timer job to run at a specified interval with no minimum (Example: 5 seconds) making testing a lot faster.

 

Since this script does not actually modify anything, it makes it easy to turn it off and on during your testing cycles.

 

PowerShell Script
  1. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
  2. $job = $(Get-SPTimerJob -Identity 'job-workflow')
  3. while($true)
  4. {
  5.     $job.RunNow()
  6.     Start-Sleep(10)
  7. }

To use the script do the following:

  • Ensure you are running the PowerShell console as a SharePoint Administrative account.
  • Configure the value in "Start-Sleep" to the interval the workflow timer job should run at.

Outcomes