How would one go about canceling a process if the user clicks the cancel button in a user input task?

How would one go about canceling a process if the user clicks the cancel button in a user input task? If the form is canceled I need it not to give the user an associated task. I am looking through the documentation but have not been able to find a function or way to go about doing this. All help is appreciated, thank you in advance.

OriginalPostID-141710

OriginalPostID-141710

  Discussion posts and replies are publicly visible