Yes that is what I figured, I’m just not sure how to craft the query. I don’t have any info on the flow run except that it’s the one that the code is being executed in.
Some of the code are executing needs to be explicitly cancelled during some error conditions, otherwise it will run forever. We can cancel the task, but this doesn’t actually stop the processes we’ve kicked off. What I thought I’d do is monitor the task or flow state and when it is cancelled and then use that to stop and cleanup after the subprocesses.