Execution error : System.IO.DirectoryNotFoundException

I managed to run a robot from the Orchestrator CE. A simple ”Hello, World” working just fine.
However, when I switch the process to a more complicated set of sequences, where I work with MS Word files, I get the error.
The full text is:
Process: Garantii
Environment: Demo garantii
Robot: Robot 2
Info: “Execution error : System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Users\user\AppData\Local\UiPath\Projects\Garantii.1.0.6711.33011\lib\read ini\Main.xaml’.\r\n at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)”
Start Time: 2018/05/17 15:56:49
End Time: 2018/05/17 15:57:19
Strangely, there is no such path on my computer. The closest path is: “C:\Users\user\AppData\Local\UiPath\Projects\Garantii.1.0.6711.33011\lib”, without “read ini” and “main.xaml”.
The process works perfect in Studio.

Any ideas, please?

Check the project.json file in your project folder that you are designing from to see if the Main paramater has the correct workflow filename. You will need to close Studio before editing the file. If it was wrong and you edited it, then reopen the workflow in Studio and publish it again.

I don’t know if that’s your problem but have seen that issue in the past.

Regards.

Hi Clayton,
Seems the issue is generated by invoking a workflow. Everything goes fine when I don’t invoke workflows.
Should the invoked workflow be loaded in Orchestrator?
Any idea?
Thanks

Indeed, everything works if the invoked workflow is in the same directory as the main project.
However, this makes the invoked workflows less reusable (increase their maintenance effort).

I see. I can’t tell for sure without seeing your workflow, but I suspect you are using the Relative filepath to your invoked workflow.

By “Relative” I mean you don’t include the entire directory (ie “workflow.xaml” instead of like “C:\shared\workflow.xaml” or wherever you have it being stored at).

The relative uses the current directory of your published project, and when you publish it all files in the project folder gets moved to your AppData location and uses that directory.

So, what you need to do is just check your the filepath used in your Invoke and make sure you are using the full filepath to your reusable component.

Hope that answers it.

Regards.

2 Likes

Clayton,
You are right. Changing the paths from relative to absolute solved the problem.
Excellent idea.
Thank you,
Daniel