The given key was not present in the dictionary error appears when fetching data from queue

Hello Team

I am trying to fetch some data from queue and I have provided the queue name in config file.
This error occurs in New Transaction Sequence and source of which is Get Transaction Data.
And in Get Transaction Data we have get Transaction Item which fetches queue name from

1.From where does queue getting the value? Because in Initialisation process we just have the argument in_OrchesratorQueue and no logic of geting it from excel. Is the error occuring due to this?
2. As soon as control reaches to Get Transaction data process in main.xaml ,it skips all and moves o Transition and goes to New Transaction sequence.
As soon as I loaded data into queue I ran main.xaml thus i suppose there is no chance of data update in website.



Here the issue is not with queues and is the KEY name of the dictionary variable,i.e.,
Make sure that you have this name in the config file and

also validate whether you have passed arguments with right direction across the states and workflows, as we might miss at some times in that

Cheers @nukul


Regarding the name in config file,the entry is available

And I didnt changed any assignments which were there by default.

I suppose it is looking for the key which is OrchestratorQueueName but again i didnt found out any activities which are reading the queue name from the Config file.

Attaching screenshot of Get Transaction Data


@nukul Can you post whole exception?

Hello Arpit

Please find the complete excepion

Source: Log message (New transaction retrieved)

Message: The given key was not present in the dictionary.

Exception Type: System.Collections.Generic.KeyNotFoundException

RemoteException wrapping System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at lambda_method(Closure , ActivityContext ) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context) at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity)
at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor) at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath) at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)
at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Then the error is the Config file didnt have this key: LogMessage_GetTransactionData that should be in the Constants sheet of the excel config file. It will be read here:

1 Like

Exception is throws from this point = > Source: Log message (New transaction retrieved)

you would need to have this key present in your config.xlsx

Hi @nukul,

Looks like a given Key is missing from Config file. Refer the below Screenshot and verify whether all <Key,Value> Pair is Present in Config.

Hope this Helps !!


1 Like