Error Fix For "The Following Workflows Are In A Least One Invocation Cycle" Thrown While Publishing

Why an invocation-related exception is obtained while publishing the workflow from Studio?

Error summary and root cause:

Error Description: Sometimes, while publishing the automation workflow from Studio to Orchestrator, an exception that says - "Unexpected error has occurred during the library compilation process: The following workflows are in a least one invocation cycle: __________" is received.


Root Cause: This error usually appears when one of the mentioned workflows are invoked using "Invoke Workflow File" and somewhere between those Invokes one of them is called again, creating a (possible) loop.

Example:

In the example above, observe that there are 3 workflows involved ( listed below). The following workflows are in a least one invocation cycle,

  • * 'C:\Users\jgoto001\Documents\UiPath\Azure DevOps\AF Binder Finalization\GetReportReleaseDate.xaml'
  • * 'C:\Users\jgoto001\Documents\UiPath\Azure DevOps\AF Binder Finalization\Main.xaml'
  • * 'C:\Users\jgoto001\Documents\UiPath\Azure DevOps\AF Binder Finalization\AdvanceFlow\FinalizeFlow.xaml'

Resolution: Check the associated activities in the automation, and make sure the 3 workflow files are not calling each other,

  • * 'C:\Users\jgoto001\Documents\UiPath\Azure DevOps\AF Binder Finalization\GetReportReleaseDate.xaml'
  • * 'C:\Users\jgoto001\Documents\UiPath\Azure DevOps\AF Binder Finalization\Main.xaml'
  • * 'C:\Users\jgoto001\Documents\UiPath\Azure DevOps\AF Binder Finalization\AdvanceFlow\FinalizeFlow.xa

3 Likes

In my opinion, encountering an invocation-related exception while publishing a workflow from UiPath Studio to Orchestrator is a significant hindrance for developers. Recursion is a crucial aspect of programming, and it is better not to limit it in this way. Components that invoke themselves are often used when searching through nested files and folders or nested data. Detecting potential infinite loops is not worth the trouble, and at most, a warning could be issued.

6 Likes

Hey there,

I’ve come across the same error, and I fully agree with Konrad_Mierswa’s viewpoint on the importance of recursion in programming. Personally, I believe it would be more helpful to have a warning message rather than an error in this scenario.

Many thanks!

3 Likes

Hi there,

I have come across the same error as well.
I have a bot which uses recursion to solve for the combination of n number of invoices that matches a specific payment amount. (Which I believe it’s quite a common use case). The bot works well but I’m not able to publish it due to this error. Is there any workaround available?

Any update on this? i want to use recursion in one of my projects.

Recursion works fine in Windows-Legacy projects, but it seems that it’s not yet supported in Windows. Do you have any ETA on this? Currently represents a blocker in migrating from Legacy to Windows.

4 Likes

It is absurd that UiPath restricts such a fundamental concept as recursion.

They also allow you to test it, figure out it works to solve whatever problem is at hand but stops you from publishing the package. Which is even more absurd.

3 Likes

I have the same issue. Not even using recursion -.-

Our Legacy framework processes work fine, when updating to Windows framework it works fine in Studio, but not able to publish…

Check if you have a folder named Process. If yes, try to rename it to ProcessessFolderToWork and retry the publish.

That’s absurd.

I have a folder 3 folders back which is named Processes. Are there any other official solutions? Has anyone found a fix?

My workaround is to use flowchart in which I link to the first activity when I want to call recursive (so instead of wraping everything in sequence and calling the same workflow in it, I put the workflow into flowchart and in this case it works…)