示例#1
0
 // TODO: we propagate an unhandled exception during an operation back to the task, should we handle it differently?
 private void BodyFaultCallback(NativeActivityFaultContext context, Exception propagatedException, ActivityInstance propagatedFrom)
 {
     if (!context.GetReceiveRequestSendResponseScopeExecutionProperty().TrySetTaskCompletionSourceException(propagatedException))
     {
         // this will add a WorkflowInstanceAbortedRecord with the reason
         context.Abort(propagatedException);
     }
     else
     {
         // this won't add any WorkflowInstanceAbortedRecord at all
         context.Abort();
     }
     context.HandleFault();
 }