Custom Activity Hanging when calling Async API's


I have a custom activity that calls a Web API to upload a file.
Everything works fine, the API gets executed and returns correctly.


public async Task UploadDocument

  • returns an Ok() result (the OK is of type ControllerBase)

Execute Function:


doAsync Function:

private async Task doAsyncCall()

var response = await httpClient.SendAsync(request);
obj.statusCode = response.StatusCode.ToString();
obj.isSuccessStatusCode = response.IsSuccessStatusCode;
return “Completed”;

I am now at my wits end with this as I have tried a few other approaches to avail.

Any help?

Presumably you might be using the CodeActivity instead of AsyncCodeActivity.

You can refer here for some samples I did -

1 Like