I have a workflow. It fires on create or as a child, and waits 30 days until the Expiration Date on a custom entity called Contact Subscription. At the 30 day mark, a Task is created for the Accounting team to generate an invoice. When the Task is marked complete, it updates the Expiration Date to a year out and restarts itself.
Here is a screenshot of the workflow. I have bleeped out the product name. This is 2011 on premise, R9 I think.
Most of the time, this workflow is working. There are several out there for which this process has worked just fine.
However, there are several workflows where it gets stuck on the Timeout condition (you see the spinning circle in the screenshot). These Workflow records contain the following message (in the Message field of the System Job):
Workflow paused due to error: Unhandled Exception: System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.Workflow.ActivityHostBase.OnWorkflowLoaded(WorkflowApplication activityInstance, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.ActivityHost.StartWorkflowExecution(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context, Activity preLoadedActivity)
Researching this error yields a lot of issues with custom code and the SDK, but there's nothing custom involved here.
Does anyone know this error? Thanks in advance.