cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Failed to start workflow. The given key was not present in the dictionary.

Hi,

 

I have a Nintex 2013 list workflow running on a document library.  When an item is edited the workflow starts.  The workflow runs for hundreds of items but every now and then the error 'Failed to start workflow. The given key was not present in the dictionary.' occurs, and the workflow status changes to 'Error occurred'.

 

Any explanation for this error popping up every now and then, for no apparent reason ?

 

Best Regards,

Atli

Labels: (1)
Tags (1)
0 Kudos
Reply
13 Replies
Workflow Hero

Re: Failed to start workflow. The given key was not present in the dictionary.

Hi,

have you recently upgraded your Nintex Workflow installation? I've encountered that error after a version upgrade where it was required also to do a database upgrade (from Central Administration) and I hadn't done it..have a look on Manage Database page in Nintex section of Central Administration

Giacomo

Accept as Solution Reply
Workflow Hero

Re: Failed to start workflow. The given key was not present in the dictionary.

How do you build your dictionary in the workflow? Secondly, how/for what do you retrieve the record in the dictionary? As later an item is being requested in the dictionary and it does not believe that it can find it as the key is missing.

I could agree that it could be an upgrade that is needed, but I would also think the issue would occur more often if this was the case.

I wonder if timing, or an order of operations is to blame.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Failed to start workflow. The given key was not present in the dictionary.

I can see a mismatch between the Nintex Workflow 2013 version and the Nintex database version.  I will proceed in upgrading the database version and keep you posted. Thank you for your answer!

Regards,

Atli

0 Kudos
Accept as Solution Reply
Not applicable

Re: Failed to start workflow. The given key was not present in the dictionary.

Thank you for your answer.  I do not specifically build a dictionary in my workflow actions, although that might be happening behind the scenes.  The workflow fails before it starts, so no actions are taken in the workflow when the error occurs.  I will review my workflow though and try to make sure that it is well formed.

Regards,

Atli

0 Kudos
Accept as Solution Reply
Not applicable

Re: Failed to start workflow. The given key was not present in the dictionary.

After further investigation I have realized that the versions match, but we are running an old version of Nintex Workflow 2013:

Product version: 3.0.5.0
Database version: 3.0.0.3
Release date: 23rd September 2013

We are now in the process of upgrading the product in our environments to the latest version:

Product version: 3.0.8.0

Database version: 3.0.0.6

Release date: 21st July 2014

As can be seen in the Release Notes: Nintex Workflow 2013 - Release Notes

I hope the upgrade will have a positive effect on the functionality of the product.

Cheers,

Atli

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Failed to start workflow. The given key was not present in the dictionary.

Ok, I was originally thinking you were using O365 and dictionaries. Let us know if there is any improvement after the upgrade. 

Do you have any conditions around the start on edit, or does it always start on edit?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Failed to start workflow. The given key was not present in the dictionary.

Can you provide the stack trace from your SharePoint ULS logs? You should see something similar to this:

Nintex.Workflow.NWActionExecutionException: Failed to start workflow. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at Nintex.Workflow.KnownWorkflowTypes.GetWorkflowType(String type) at Nintex.Workflow.Activities.ReportingHeaderActivity.TryCreateWorkflowInstance(NWWorkflowContext

This should provide valuable insight into what dictionary the error is referring to (although I believe it to be the same as the one mentioned above).

Additionally, please export the workflow to file and provide the size of the *.nwf file. It is highly likely that the workflow is large (over 500kb). If your workflow is utilizing UDA's (User Defined Actions), those will need to be exported and counted in the overall size as they are compiled into the workflow at runtime.

Note: While there is not hard limit on how large a workflow can be (from a Nintex perspective), you will generally start to see performance issues and/or intermittent workflow failures around 500kb. If you do have a large workflow, you might want to take a look at this archived article on workflow splitting: Nintex Connect - Breaking up a large workflow, to split or not to split?

Accept as Solution Reply
Workflow Hero

Re: Failed to start workflow. The given key was not present in the dictionary.

Hi ‌,

have you been able to solve your issue with the workflows? Could you write it here what was the cause (if not already present in some answer) and mark it as the correct answer?

Thanks

Giacomo

Accept as Solution Reply
Workflow Hero

Re: Failed to start workflow. The given key was not present in the dictionary.

I am having the same issue.  Nintex Workflow 2013/SharePoint 2013 on prem.  It's every once in a while but on the same workflow.  It's a simple rename the document and move to a certain library workflow.

Was this ever resolved for you?

0 Kudos
Accept as Solution Reply