Tejaswi Bhangi

05/02/2023, 10:26 PM
Hi, what is the right way to respond to a cancellation in the UI? I have a task that kicks off an asynchronous run of a job in an external resource, and would like to send a cancel request to that job when the flow is cancelled in the UI. I have an understanding of how this would have been done in Prefect 1 (with state_handlers) but I'm not sure of the right way to do this in Prefect 2. I found this thread, are there any other options other than external automation?:
My use case is similar to this thread actually: