none
Update Resources Activity generates "The given key was not present in the dictionary" error RRS feed

  • Question

  • I have a basic "update resource" activity that sets a description attribute with a timestamp.

    However, the workflow fails to execute.  I receive the following error message in the Request Workflow Remarks.    I cannot seem to figure out what this means.    Any guidance would be helpful

    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.ResourceManagement.Query.QueryParametersGenerator.WriteRequestedAttributes()   at Microsoft.ResourceManagement.Query.QueryParametersGenerator.BuildParameterString()   at Microsoft.ResourceManagement.Query.QueryProcessor.BuildSqlCommand(Query objectRepresentation, Boolean countResultsOnly)   at Microsoft.ResourceManagement.Query.QueryProcessor.ExecuteQuery(Query query, Nullable`1 maximumTime, Boolean& endOfSequence, Boolean countResultsOnly, Int64& resultCount, Int64& executionTime)   at Microsoft.ResourceManagement.Data.DataAccess.GetObject(Guid objectId, CultureInfo locale, Guid requestor, String[] attributeNames, Boolean includeInlineRights)   at Microsoft.ResourceManagement.Data.DataAccess.GetObject(Guid objectId, String[] attributeNames)   at Microsoft.ResourceManagement.ActionProcessor.ActionDispatcher.Read(Guid objectId, CultureInfo locale, Nullable`1 requestor, Nullable`1 resourceTime, String[] requestedAttributes, Boolean includeRights)   at Microsoft.ResourceManagement.ActionProcessor.ActionDispatcher.ProcessOutputRequest(RequestType request)   at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteGetAction(RequestType request)   at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction(RequestType request)   at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction[ResponseBodyType](RequestType request)   at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request, Guid requestIdentifier, Object redispatchSingleInstanceKey, Boolean isRedispatch)   at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request)   at Microsoft.ResourceManagement.Workflow.Hosting.RequestWorkItemProcessor.DispatchRequest[TResponseType](RequestType request, Boolean applyAuthorizationPolicy)   at Microsoft.ResourceManagement.Workflow.Hosting.RequestWorkItemProcessor.ProcessGetWorkItem(ReadRequestWorkItem readWorkItem)   at Microsoft.ResourceManagement.Workflow.Hosting.RequestWorkItemProcessor.ProcessWorkItem(WorkItem workItem)

    Friday, December 15, 2017 2:33 PM

All replies

  • Please validate the attribute name. If its correct in the activity.

    Thanks

    Deepak

    Monday, December 18, 2017 4:57 PM
  • I have reduced the workflow down to its smallest component

    DateTimeFormat(DateTimeNow(),"dd/MM/YYYY HH:mm") fed to $LongDate 

    "Disabled by MIM " + $LongDate      fed to the target [//Target/description]

    The time format expression looks correct, and I even allow nulls.


    • Edited by 5teven Tuesday, December 19, 2017 4:23 PM
    Tuesday, December 19, 2017 4:23 PM
  • I have reduced the MIMWAL activity to just putting a static string in [/Target/description].    what more can I do to validate the attribute name? This is about as simple as it gets.

    Monday, January 22, 2018 3:34 PM
  • Verify that the attribute is really "description" and not "Description" or something similar.


    Wednesday, January 24, 2018 4:55 PM