jortiz8
Nintex Newbie

Error occured in workflow (nintex failed to start workflow. the given key was not present in the dictionary)

We have an approval workflow which are running on the SharePoint list item. It starts when new item created in the SharePoint list.Daily instances are running for this approval workflow is approx 100. This error (Nintex failed to start workflow. the given key was not present in the dictionary) occurs in approx in 3-4 months for some of the instances of the workflow.


Below is the error stack


Nintex.Workflow.NWActionExecutionException: Failed to start workflow. ---> 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 Nintex.Workflow.KnownWorkflowTypes.GetWorkflowType(String type) at Nintex.Workflow.Activities.ReportingHeaderActivity.TryCreateWorkflowInstance(NWWorkflowContext ctx, ActivityFlags parentFlags) at Nintex.Workflow.Activities.ReportingHeaderActivity.Execute(ActivityExecutionContext executionContext)
Nintex Workflow 2010 General 0000 Unexpected ...t System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run()


Please help me to find out the exact root cause of this issue? and solution to avoid such kind of issue in the future.

Below are detail of Nintex version,

Nintex version: Nintex Workflow 2010 (2.3.10.25)

0 Kudos
Reply
2 Replies
praios81
Ribbon Ruler

Re: Error occured in workflow (nintex failed to start workflow. the given key was not present in the dictionary)

Hi Juan,

before hunting ghosts I'd suggest you first bring Nintex Workflow up to date. Latest release for Nintex Workflow 2010 is 2.5.1.0. The version you run was released in early 2014 and should be updated in any case.

As you can see in the patch notes a lot of bugs have been shot in between so I see good chances that you can solve your problem too.

Nintex Workflow 2010 - Release Notes 

Kind regards,

Enrico

Reply
thomas_xu
Cloud Wanderer

Re: Error occured in workflow (nintex failed to start workflow. the given key was not present in the dictionary)

Hi Juan Carlos Alarcon

As Enrico Knapp‌ suggested, upgrading to the latest version may just fix the issue. 

You may already have solved this problem but since no correct answer has been marked for this question i will share my experience on the "failed to start" error. I too experienced this issue but was for Nintex Workflow 2013. Mine was due to the fact that workflow was too big and it exceeded the timeout (default is 2 mins if i recall correctly), this may not be your issue.I would  check the server logs and see if there are any timeout errors. Another way to confirm this is to time the time it takes for it to reach "failed to start" error. If they all consistently "failed to start" after x number of minutes exactly then its pretty clear its a timeout issue. There are a number of workarounds/solutions you can then apply 

1. Extending the default timeout period (if business allows)

2. Try reducing the workflow size by reducing the number of workflow actions in your workflow. 

3. See if you can start the workflow manually after it fails to start the first time. If you can, consider using a site workflow to run every half hour/one hour to start those workflows that have failed to start. (if business accepts the delayed start of the workflow) bear in mind this is only a workaround not a solution.  

Reply