Error while invoking a workflow

Hello to all

I need help with an error that I am facing. I have a workflow A in which I have a “Invoke Workflow” command which calls another workflow B.

I have the path/name of the workflow B in an excel. I am picking the value using “Read Cell” into a Generic Variable, and then giving the Variable name in the Invoke Workflow Activity.

Earlier this was working well, now, it gives me the error
System.UnauthorizedAccessException: Access to the path ‘C:\RPA\Code’ is denied.
at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

When i give the value to the Invoke Workflow activity , as “C:\RPA\Code\Webdownload.xaml” , its working. If I run the Webdownload.xaml separately, it runs fine.

Cant figure out what I’m missing here. :tired_face:

Please Help!
Aman

@a2dhanja

If you can attach your XAML file…

I think the error might be in passing arguments.

You can have workflow anywhere in the drive but when you are calling a workflow which is outside your project folder you will have to give the full path.

Also, arguments name in the workflow A and Workflow B MUST be same and there direction IN/OUT MUST be same too. Check that and run it again

1 Like

Hi @PrankurJoshi , I revisited my code and realized, that the variable i was using was getting nullified before the Invoke Workflow activity was being called. I was able to find out by displaying the value of the variable in a message box. I fixed that and now its calling it fine.

Thanks for the inputs. :pray:

1 Like