How to make AsyncCodeActivity implementation work in UiPath

activities
custom_activities
uipath

#1

Hi All,
I have created a a nuget package with a custom activity to perform text recognition in an image using Microsoft Computer Vision APIs.

I have used AsyncCodeActivity as the text recognition involves asynchronous Task API invocations.
I have overridden BeginExecute and EndExecute methods of AsyncCodeActivity to achieve the functionality.

I have used the Microsoft Cognitive services docs as the starting point for text recognition:

I have modified it with Task APIs usage, as required by the AsyncCodeActivity contract.

When I build and run this solution in Visual studio 2017, it works flawlessly - text recognition happens smoothly with the results being returned for both local and remote images.

When I deploy this AsyncCodeActivity package to UiPath, execution stops at a certain point of time. Specifically, this happens when the AsyncCodeActivity waits for the ExtractRemoteTextAsync and ExtractLocalTextAsync tasks to finish execution.
Execution is blocked and doesn’t proceed further.

When I try CodeActivity, the results are no different.

Can any one let me know what the issue could be and how to resolve this?.

Prior discussions on the forum have indicated to use AsyncCodeActivity but has anyone successfully got this to work?.


#2

Does any one have any inputs on this?.
Is UiPath suitable to handle Asynchronous calls in custom activities?