Invoked workflow validation error - Value for a required activity argument 'Value' was not supplied

workflow
studio
error

#1

Scenario:

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.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.Core.Activities.InvokeWorkflowFile.<>c__DisplayClass21_0.b__5()
— 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.


#2

Check if any of your Arguments in that workflow are marked as required and that you’re supplying values for it correctly in the Invoke (especially typo’s).


#3

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.


#4

Seems like a caching issue.

@badita - any chance we could get a ‘Clear Cache/Temp’ option somewhere in the future? This could also help with LValue type and similar issues.


#5

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


#6

If that’s a flowchart the error might be in the decision field. Please check them. That is the only activity that is not validated by UiPath.


#7

Confirmed.
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.