Conditional Workflows Have Stopped Working

  • 26 March 2021
  • 0 replies
  • 431 views

Userlevel 5
Badge +19

ISSUE

List workflows configured to have start conditions are not starting despite meeting the conditions.

RESOLUTION

Option 1: Delete and recreate event receivers on the list

 

1. Check which event receivers currently exist on the list. You can do so by adding the Site URL and list name to the following lines and running it in the SharePoint Management Shell:

$site = Get-SPWeb "http://SiteURL" $list = $site.Lists | ? {$_.Title -eq "List Name"} $list.EventReceivers | fl Type, Class

 

2. Take note of event receivers on the list. An example of the output would be: 

Type : ItemUpdating Class : Nintex.Workflow.ConditionalWorkflowStartReceiver Type : ItemAdded Class : Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver Type : ItemAdded Class : Nintex.Workflow.ConditionalWorkflowStartReceiver Type : ItemUpdated Class : Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver Type : ItemUpdated Class : Nintex.Workflow.ConditionalWorkflowStartReceiver

 

In the output, event receivers with the class of 'Microsoft.SharePoint. . .' are the default SharePoint event receivers. Event receivers with the class of 'Nintex.Workflow. . .' are all related to conditional start.

 

3. Delete all event receivers. Add the Site URL and list name by running the following lines in the SharePoint Management Shell:

$site = Get-SPWeb "http://SiteURL" $list = $site.Lists | ? {$_.Title -eq "List Name"} $eventReceivers = $list.EventReceivers for($i=0; $i -lt $eventReceivers.Count; $i=0){ $eventReceivers[$i].Delete() }

 

4. To recreate event receivers, republish your workflow(s). Publishing a single workflow on the list that starts on 'Item Created' or 'Item Modified' will create the following event receivers:

Type : ItemAdded Class : Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver Type : ItemUpdated Class : Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver

 

Publishing a single conditional start workflow will recreate the following event receivers: 

Type : ItemUpdating Class : Nintex.Workflow.ConditionalWorkflowStartReceiver Type : ItemAdded Class : Nintex.Workflow.ConditionalWorkflowStartReceiver Type : ItemUpdated Class : Nintex.Workflow.ConditionalWorkflowStartReceiver

 

5. Confirm that all event receivers exist on the list again by repeating step 1. Monitor for any further concerns with workflows starting on this list.

 

Option 2: Delete and recreate NintexAutoStartRules.xml on the list

Note: This method requires SharePoint Designer. Additionally, this method will also delete any start conditions on Nintex Workflows on the impacted list/library. It will be necessary to reconfigure all start conditions on all Nintex Workflows and publish each one again. Please check your Nintex Workflows and take note of each start condition for your reference prior to starting this method.
 

1. Open your site in SharePoint designer and navigate to: All Files > Lists > The affected list/library.

 

2. Find and delete Nintex_AutoStartRules.xml

21115i226C2C0379AC27D5.png

 

3. Reconfigure and republish any workflows that should start on a condition. Doing so will recreate and rebuild the Nintex_AutoStartRules.xml file.

 

ADDITIONAL INFORMATION

 
There are two possible causes:
  • The event handler being used to trigger the List Workflow is not present.
  • The NintexAutoStartRules.xml file is corrupt and not indexing the start conditions correctly.
 

0 replies

Be the first to reply!

Reply