CallActivityFunctionByNameAsync assumes activities are async
kawazoe opened this issue · comments
Etienne Maheu commented
The InMemoryOrchestrationContext.CallActivityFunctionByNameAsync method assumes that activities are always async and thus always attempt to await their result. As demonstrated by the MSDN documentation on the ActivityTrigger, activities do not have to be awaitable. The current version of the code will throw a RuntimeBinderException when trying to await the result of such activities.
This method should only await the result of the call if its type have a definition for the "GetAwaiter" method.