Workflow Failed to Run in Workflow History

  • 26 March 2021
  • 0 replies
  • 1869 views

Userlevel 5
Badge +19

Issue

The workflow history of a Nintex Workflows states 'failed to run'.

 

Error Code

<workflow name> Failed to Run

 

In the ULS logs, the following errors might appear:


OWSTIMER.EXE (0x0E5C) 0x2184 SharePoint Foundation Workflow Infrastructure 72fu Unexpected Load Workflow Class: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Workflow.SPWinOeHostServices.EnsurePluggableServices(SPSite site, SPWorkflowExternalDataExchangeServiceCollection services, ExternalDataExchangeService existingServices) at Microsoft.SharePoint.Workflow.SPWinOeHostServices..ctor(SPSite site, SPWeb web, SPWorkflowManager manager, SPWorkflowEngine engine)


OWSTIMER.EXE (0x0E5C) 0x2184 SharePoint Foundation Workflow Infrastructure 98d8 Unexpected System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Workflow.SPWinOeHostServices.EnsurePluggableServices(SPSite site, SPWorkflowExternalDataExchangeServiceCollection services, ExternalDataExchangeService existingServices) at Microsoft.SharePoint.Workflow.SPWinOeHostServices..ctor(SPSite site, SPWeb web, SPWorkflowManager manager, SPWorkflowEngine engine)

OWSTIMER.EXE (0x0D64) 0x0E98 SharePoint Foundation Workflow Infrastructure frg9 Medium Workflow could not be run because SPWebApplication.UpdateWorkflowConfigurationSettings was not previously called, and the Web Application service has been disabled on this server. Call UpdateWorkflowConfigurationSettings or turn on the Web Application service for this server.

 

Resolution

Option 1
Locate one Web Front End server which has Web Application service running, run the following PowerShell command to copy workflow-related configuration from the web.config to the configuration database so it will be available from every server in the Farm.

$webapp = Get-SPWebApplication -identity http://<web app name> $webapp.UpdateWorkflowConfigurationSettings()

 

Option 2
Start the Web Application Service on all servers that have the Workflow Timer Service running.

 

Option 3

Disable the Workflow Timer Service on servers that are not running the Web Application service.

 

Additional Information

When a workflow attempts to continue (i.e. come out of a Pause action) and an Application server running the “Microsoft SharePoint Foundation Workflow Timer Service” tries to resume the workflow, it fails to run due to not having the “Microsoft SharePoint Foundation Web Application” service enabled. This error occurs because the Workflow Timer Service tries to read the workflow settings from the web.config or configuration database for the web application. By default, the workflow settings are stored locally in the web.config file of the server that is running the “Microsoft SharePoint Foundation Web Application” service.


When running workflows on application servers that are not configured to be front-end servers, the Workflow Timer service requires workflow configuration settings in Web.config to be set in the configuration database. This must be done using the UpdateWorkflowConfigurationSettings() method on the SPWebApplication object (Option 1 above), which will copy the Web.config settings from a front-end server to the configuration database.


0 replies

Be the first to reply!

Reply