Skip to main content
Search Again

We think these articles could help you:

    See More
    Nintex Knowledge Base

    Error "<Workflow Name> Failed to Run" in Workflow History

    Status: Validated

    ISSUE
    When running a workflow, the following error might appear in the Nintex workflow history page, even though the workflow completes successfully:
     
    <workflow name> Failed to Run
    ERROR CODE
    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 has been queued for resumption and the Application server with 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 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 through a script that calls UpdateWorkflowConfigurationSettings() on the SPWebApplication object, which will copy the Web.config settings from a front-end server. The script can be found below in the Microsoft recommended solution.

    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.

     

    RELATED LINKS
    SharePoint 2010: Workflow fails to run after pause in Microsoft Support