Facing Issue When i run the job from orchestrator- Cannot create unknown type '{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}GenericValue)'

Cannot create unknown type ‘{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}GenericValue)’.

RemoteException wrapping System.Xaml.XamlObjectWriterException: Cannot create unknown type ‘{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}GenericValue)’.
at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
at System.Activities.XamlIntegration.FuncFactory1.Evaluate() at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings) at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors) at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)
at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)
at UiPath.Executor.RobotRunner.d__83.MoveNext()

Why are you using Generic Value for your datatype? It’s better to be specific about the datatype of your variables.

@postwick : thanks for the reply. Same code was working fine and i have made one change and now its giving me this error. All the generic value that has been assigned to datatype need to be update to the corresponding one ?

Hi @sandeep123,

If a conditional is to be used, the type of the value becomes important. For this reason, it is recommended to specify it for the areas where you use loops and functions, although not in all areas.

Regards,
MY