Problems cancelling a running activity from parent workflow

To avoid excessive calls to the service heartbeats are not send to the service up to 80% of the heartbeat interval. So if you want to speed up the notification of the activity about the cancellation/workflow completion reduce the heartbeat interval from 1 minute to some lower value.

  1. There might be another activity which needs to cleanup after cancel, so we need to make sure current activity is indeed done first

Set ActivityOptions.WaitForCancellation to true to wait (by blocking on the activity Future) for an activity cancellation.