You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the workflow cancels itself due to an unhandled exception in a ReceiveRequestSendResponseScope, the completion state of the workflow is Closed nod Canceled.
If we let the exception to buble up, and a real OnUnhandledException event occurs, that schedules workflow cancellation after the Idle event, the completion state will be correct.
I suppose, there is missing a context.MarkCanceled(); statement somewhere in this activity that prevents the default cancellation of the root activity to finally make Canceled it's state instead of Closed. The TaskAsyncNativeActivity turns off default Cancellation, if cancellation finally happens, MarkCanceled should be called somewhere.
When the workflow cancels itself due to an unhandled exception in a ReceiveRequestSendResponseScope, the completion state of the workflow is Closed nod Canceled.
If we let the exception to buble up, and a real OnUnhandledException event occurs, that schedules workflow cancellation after the Idle event, the completion state will be correct.
I suppose, there is missing a context.MarkCanceled(); statement somewhere in this activity that prevents the default cancellation of the root activity to finally make Canceled it's state instead of Closed. The TaskAsyncNativeActivity turns off default Cancellation, if cancellation finally happens, MarkCanceled should be called somewhere.
See: http://blogs.msdn.com/b/carlos/archive/2013/02/06/wf4-workflow-foundation-4-understanding-cancellation.aspx
The text was updated successfully, but these errors were encountered: