Recently I’ve stumbled on a strange error in SharePoint. In the entire site collection I couldn’t start any workflow (nobody could). If workflows were set to start automatically, they would fail immediately with the message Failed on Start (Retrying)
If they were set to manual start after clicking the Start button on the workflow initiation form, nothing would happen.
In SharePoint logs I’d find the following message:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Microsoft.SharePoint.Workflow.SPWorkflowManager.IsConfigForSite(SPSite site) at Microsoft.SharePoint.Workflow.SPWorkflowManager.GetWorkflowConfurationSection(SPSite site, String section) 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) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeConstructor(Object args, SignatureStruct& signature, IntPtr declaringType) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object args, CultureInfo culture, Object activationAttributes) at Microsoft.SharePoint.Workflow.SPWorkflowManager.LoadPluggableClass(String classname, String assembly, Object parameters) at Microsoft.SharePoint.Workflow.SPWorkflowManager.GetService(SPWorkflowAssociation association, SPWorkflowEngine engine) at Microsoft.SharePointWorkflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions)
On another site collection on the same server workflows were working normally.
I’ve tried to resolve the problem with the solution described here but unfortunately it didn’t work.
At the end what worked for me was to re-enable workflows on site.
In Central Administration select Application Management and Manage web applications
Next select the failing Web application
Now click arrow under General Settings in the ribbon and select Workflow
Select No for "Enable user-defined workflows…" and click OK.
Now reopen the Workflow settings dialog by clicking on General Settings –> Workflow again
and select Yes, to re-enable user defined workflows.
Confirm your selection by clicking on the OK button.
This got my workflows up and running again.