# Error while invoking a workflow

**URL:** <https://forum.uipath.com/t/error-while-invoking-a-workflow/63063>\
**Category:** Help\
**Tags:** workflow, excel, system, activities\
**Created:** [September 2, 2018, 6:52am UTC](https://forum.uipath.com/t/error-while-invoking-a-workflow/63063 "2018-09-02T06:52:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![a2dhanja](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@a2dhanja](https://forum.uipath.com/u/a2dhanja)\
**Post date:** [September 2, 2018, 6:52am UTC](https://forum.uipath.com/t/error-while-invoking-a-workflow/63063/1 "2018-09-02T06:52:38Z")

</div>

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

Please Help!  
Aman

---

<div class="post-metadata">

**Author:** ![Sob](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sob/32/27454_2.png) [@Sob](https://forum.uipath.com/u/Sob)\
**Post date:** [September 3, 2018, 6:58am UTC](https://forum.uipath.com/t/error-while-invoking-a-workflow/63063/2 "2018-09-03T06:58:52Z")

</div>

@a2dhanja

If you can attach your XAML file…

I think the error might be in passing arguments.

---

<div class="post-metadata">

**Author:** ![PrankurJoshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prankurjoshi/32/37212_2.png) [@PrankurJoshi](https://forum.uipath.com/u/PrankurJoshi)\
**Post date:** [September 3, 2018, 7:10am UTC](https://forum.uipath.com/t/error-while-invoking-a-workflow/63063/3 "2018-09-03T07:10:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![a2dhanja](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@a2dhanja](https://forum.uipath.com/u/a2dhanja)\
**Post date:** [September 11, 2018, 10:02am UTC](https://forum.uipath.com/t/error-while-invoking-a-workflow/63063/4 "2018-09-11T10:02:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [October 29, 2018, 9:14am UTC](https://forum.uipath.com/t/error-while-invoking-a-workflow/63063/5 "2018-10-29T09:14:02Z")

</div>

Closed on October 29, 2018, 9:14am UTC


