Invoke Workflow with arguments fails with ArgumentNullException error

Hi,
When I try to execute the “System1_CreateYearlyReport” work flow, I am getting the below error. I initialized all the 3 In Arguments and even tried only with In arguments. I tried copy & pasted all the work flows in a new folder. But there is no success so far. I searched all the relevant posting before raising this question. Please assist here…

System.ArgumentNullException: Value cannot be null.
Parameter name: expression
at System.Activities.InArgument1.FromExpression(Activity1 expression)
at System.Activities.InArgument1.op_Implicit(Activity1 expression)
at UiPath.Core.Activities.OnWaitActivity.<>c__DisplayClass17_0.<.ctor>b__0()
at System.Activities.Activity.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, IList`1& validationErrors)
at System.Activities.Validation.ActivityValidationServices.InternalActivityValidationServices.InternalValidate()
at System.Activities.Validation.ActivityValidationServices.Validate(Activity toValidate, ValidationSettings settings)
at System.Activities.Presentation.Validation.ValidationService.CoreValidationWork(ValidationReason reason, CancellationToken cancellationToken)

Hi @SVK,
Please share your workflow.

Hi @Chetan94k. Thanks for your prompt response. Being a new user, I am unable to upload the files. Please suggest if there is any other way to share 2 XAML files.

You should find upload button in the editor tools panel.

@SVK

hope you tried to use writeline activity to test before you call invokeworkflow file. if not please test and ensure all the arguments which passed to workflow file has data

if you are not able to upload the XAML, you can share multiple Screenshots as well.

Regards,
Venkat

Have you assigned ReportYear to 2017?

Hi Venkat & Roofus,
Thanks for your response. Actually the root cause is bit strange. It was not at all related to arguments. I tried to validate the workflow by commenting out the activities one by one. When I comment out one On Element Appear, the issue vanished. Again, I wish UiPath to come up with user friendly error log messages or pointing out the exact step / activity for easy debugging.

1 Like

You can try debug mode with slow step process which highlights in yellow box to show which step/activity is in process. Also output panel shows you step by step activity information.

@Roofus, would you please explain how to turn on the debug mode?

Hope this will help you.

1 Like