locked
Failed Workflow-System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. RRS feed

  • Question

  • Greetings,

    I currently have an issue with some of my notification subscriptions. The workflows that correspond to those subscriptions have been failing every few days. Some faile more than others. When I go to Workflows>Status and then click the workflow that corresponds to the subscription, I see that some need attention.

    The error is the same for pretty much all the ones that are failing. Any help would be appreciated. I have not been able to find anything out there about this specific error. Also, the management packs that these are stored in do not depend on any other unsealed management pack. I am currently at SCSM 2010 SP1 CU1. The management packs were made when we were at RTM so these custom mp's that hold these subscriptions are version 7.0.5826.0

    Thanks again for the assistance.

    Failure Details

    Error Code 0

    Error Message

    Task submission error

    Exception

    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.EnterpriseManagement.Notifications.Workflows.RelatedPropertyToken.RetrieveValue(UserSettings settingsIn, EnterpriseManagementObject instance, Dictionary`2 relationshipIdToInstanceToRelatedObjectMapping)
       at Microsoft.EnterpriseManagement.Notifications.Workflows.TokenizedMessage.PopulateTokenValues(UserSettings userSettings, EnterpriseManagementObject instance, Dictionary`2 relationshipIdToInstanceToRelatedObjectMapping)
       at Microsoft.EnterpriseManagement.Notifications.Workflows.RecipientGroupMessage.PopulateTokenValues(UserSettings userSettings, EnterpriseManagementObject instance, Dictionary`2 relationshipIdToInstanceToRelatedObjectMapping)
       at Microsoft.EnterpriseManagement.Notifications.Workflows.SendNotificationsActivity.Execute(ActivityExecutionContext executionContext)
       at 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()

    Monday, March 21, 2011 10:23 PM

All replies

  • Update on my issue:

    1. I created new management packs from the console so that they are 7.0.6555.0.
    2. I then created new templates identical to the old notification templates and saved them in the new management packs I created. I did not copy and paste the body of the old templates into the new because I found this was problematic when I tried it.
    3. I created new subscriptions identical to the old notification subscriptions and saved them in a new management pack as well. In these new subscriptions I had them use the new notification templates.
    4. I then created new incident event workflows in the incident event workflow configuration area and also had them use the new notification templates.
    5. I then deleted all the old incident event workflows, Notification subscriptions, and notification templates by deleting the management packs they were stored in since I created mp's just for them.

    about a day went by without issues but then I saw the same error in workflows\status:

    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.EnterpriseManagement.Notifications.Workflows.RelatedPropertyToken.RetrieveValue(UserSettings settingsIn, EnterpriseManagementObject instance, Dictionary`2 relationshipIdToInstanceToRelatedObjectMapping)
       at Microsoft.EnterpriseManagement.Notifications.Workflows.TokenizedMessage.PopulateTokenValues(UserSettings userSettings, EnterpriseManagementObject instance, Dictionary`2 relationshipIdToInstanceToRelatedObjectMapping)
       at Microsoft.EnterpriseManagement.Notifications.Workflows.RecipientGroupMessage.PopulateTokenValues(UserSettings userSettings, EnterpriseManagementObject instance, Dictionary`2 relationshipIdToInstanceToRelatedObjectMapping)
       at Microsoft.EnterpriseManagement.Notifications.Workflows.SendNotificationsActivity.Execute(ActivityExecutionContext executionContext)
       at 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()

    I am now convinced it is not the old management packs the subscriptions and templates were stored in since i started fresh like this and tested the workflows using mp version 7.0.6555.0

     

    Thursday, March 24, 2011 9:12 PM