I am trying to invoke a workflow but it is not allowing me to, it gives the following error:
System.Exception: The invoked workflow ‘XXX’ has validation errors. Please review the workflow and resolve the errors. —> System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
‘XXX’: The private implementation of activity ‘1: XXX’ has the following validation error: Value for a required activity argument ‘Value’ was not supplied.
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
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)
— End of inner exception stack trace —
at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager
The workflow invoking this one invoke other activities just fine but it fails when trying to invoke this specific.
I have had a look through the workflow but can’t see any validation errors, and when I use the “Validate” option in Studio it says “No validation errors found”.
Slightly baffled by this one. Anyone encountered anything like it before? It has the same dependencies and arguments as the other workflows that are still successfully being invoked.
Thanks, but that wasn’t the issue. It seems it was a bug with UiPath itself where in an assign I had a value on the right hand side and everything looked fine in the UI but the compiler did not actually see the value. Fixed by restarting UiPath a couple of times, then the validation error showed up.
Actually, upon further testing, it seems UiPath has an issue when trying to assign only a space i.e (" “) to a string variable. I’ve tried no space “” and having a space then a value " ,” and both those work. Really odd, and a big headache that it doesn’t pick up as a validation error
Interestingly enough, it works as a default value.
As a workaround, can you use this? Seems to work on my end. string myString = Space(1)
Note: Space is a static from VB library that produces a string with just n spaces in it.
I just ran into this issue as well. Who would have thought a single space string would be a problem. Thankfully this was posted, because the UiPath error was totally unhelpful and I don’t know how I would have found this without this post. I’ve removed this " " and now my process is working again.