The given key not present in the dictionary error throwing for 2nd transaction.Can anyone guide what's the issue?

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)

@vnsatyasunil

Please check the followings

  1. The Queue name and value in the Config file is correct or not.
  2. The Asset name and value in the config file.
  3. While using the Asset or Queue name in your workflow.
  4. “Add Queue Items” activity → check for any spaces before or after the argument.
  5. If you have any spaces use Trim method.

checked everything correct but throwing error

@vnsatyasunil

Could you please share the screenshot of the issue.

individually values are coming for config variable in write line. But at throw activity the given key was not found in the dictionary error throwing from 2nd transaction. Please let me know if u know

Hi @vnsatyasunil,

Can you share the screenshot of write line activity?

Or where the process get error, please share it’s screenhot. We cant understand now.

Regards.
Ömer

For eg write line=in_config(“error”). ToString
Write line=io_Dictionary("variable name "). ToString
Output is correct from these write line activities.

Next for below throw activity,if we give like this,the given key not present in the dictionary error throwing from 2nd transaction

Throw activity=New Business Rule Exception (“name is”+io_Dictionary(“variable name”). ToString+“config error is”+in_config(“error”). ToString+“got the names”).

If we use below throw activity,value coming fine
Throw activity=New Business Rule Exception (
in_config(“error”). ToString

Can anyone guide what’s the issue?