Visual Studio UiPath Custom Activity Extension - How to add a timeout to an activity?

I am attempting to create a C# Custom UiPath activity using the UiPath extension in Visual Studio 2019. The only thing I am wanting the activity to do is provide a scope activity that can timeout so we can place other activities inside it that do not have timeouts built into them and still effectively create a timeout for those activities. The UiPath Add Activities wizard has a toggle for a timeout field, but the code for the timeout does not seem to work.

Does anyone have any recommendations for adding a Timeout to a C# custom scoped activity?


1 Like

Hi @jaspearson,

Have you solved this issue?

We had the same issue and we solved it by initializing Task in ExecuteAsync function instead of using the built in ExecuteWithTimeout function.