Does task exist

I have a process model that cancel a task.  I am getting an error email stating that the task to cancel does not exist.  We should not experience this in our production environment since we check to see if a task has been completed. In our test environment we routinely clean up our task to prevent clutter. So, we have experienced this on occasion.  UIs there a way to check to see if a task exists before trying to cancel it using the smart service?  I was hoping there was a function or some query I could run.

  Discussion posts and replies are publicly visible