Fixed issue in branch conditional
Added default case for malformed requests
Seperated cancellation from termination.
Added check for termination as well as cancellation.
Updated workflow to use cancellation over termination status.
Fixed logic error.