GetAsset() in CodedWorkflows freezing when using all arguments

Hi, Im posting this bug in the Studio/Tools section because I didn’t found a specific one for Coded Workflows issue.

When using system.getAsset() function, there’s 3 options of signatures to use, they are:

object GetAsset(string assetName);
object GetAsset(string assetName, string folderPath);
object GetAsset(string assetName, string folderPath, CacheStrategyEnum cacheStrategy, int timeoutMS);

The third one, with CacheEstrategy and timeoutMS parameters is not executing corretly, freezing the robot for, I think, forever :smile:

I tested it with an array of values for TimeoutMS as well, but it does not produce any chage in this behavior.
Here is how Iam calling it in my code:

string BasePaths = (string)system.GetAsset("MyAsset","MyFolder", UiPath.Core.Activities.CacheStrategyEnum.Execution, 1);

Obviously MyAsset and MyFolder are fake values for the example. In using correct values for each param, they even work when calling this functon with the first and second signature options.

No error is being thrown either.

Edit: Im using 23.10 Studio Enterprise with 23.10 packages

Hi Lucas,

It seems like there is indeed a concurrency issue when the timeout is getting hit.

In your case, it would pretty much always get hit, as 1 ms is not enough for this call. If you’d use a higher timeout value the call should work just fine.

Thanks,
Alvin

2 Likes

Hi alvin, unfortanelly the problem occurs independently of the timeout param.

1 Like

Hey Lucas,

We have indeed identified a general problem with this operation, both in XAML and in code, when using short timeouts and we’ll work on fixing this.

In the meantime, please use a timeout value which would permit the operation to run, e.g. >=1000 ms.

Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.