Error Fix For "The following workflows are in at least one invocation cycle" thrown while publishing

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

Issue Description

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 at least one invocation cycle: __________" is received.

Root Cause

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

Example:

image.png

Resolution

Check the associated activities in the automation, and make sure the 3 workflow files are not calling each other (e.g.: Calling B in A and A in B, etc).

Note: This issue was caused by a bug affecting major versions 21.10, 22.4, 22.10 and 23.4 Studio. This was fixed starting with version 23.10.0.

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…)