Checks for requests to cancel the workflow execution. This should be used to allow graceful termination of workflow executions.
If this method is not used and acted upon, a simple ‘cancel’ request for the execution will have no effect - ‘force-cancel’ will have to be used to abruptly terminate the execution instead.
Note: When this method returns True, the workflow should make the appropriate cleanups and then it must raise an ExecutionCancelled error if the execution indeed gets cancelled (i.e. if it’s too late to cancel there is no need to raise this exception and the workflow should end normally).
Returns: whether there was a request to cancel the workflow execution
This exception should be raised when a workflow has been cancelled, once appropriate cleanups have taken place.