Can I terminate (not merely cancel) a currently running API workflow?

Is this possible? Thanks!

2 Likes

Update: I’ll explain the use case.

  1. A user clicks a button that sets off an api workflow to create a bunch of things.

  2. Two seconds later, the user decides to delete those things by clicking another button.

Problem: I can run a delete action but the workflow may still be looping through, creating new things.

Sure, I could schedule a workflow for 10 minutes in the future to perform the delete of the things, but that’s confusing to the user if they have to wait 10 minutes for the things to disappear.

That’s why I want to be able to terminate an api workflow in process and then run the delete now.

Is this possible? Or is there another way to do what I need to do?

Thanks!

I schedule the delete api later and then mark it in another field called Delete as “yes”. When I have a list I just filter out all the Delete = yes. Then it removes it instantly. :slight_smile: Hope this helps.

If you create an api workflow loop (bunch of things), then yes you can interrupt any ‘in progress’ api workflow with a condition ‘terminated?’ at the API start point condition for that specific user, and then continue with another workflow. But you probably figure it out :wink:

Thanks @J805, I try to avoid filters when possible, but that would be an option.

thanks @JohnMark, but I’ve been trying things for an hour and I’m not quite getting it. Are you able to explain a little further? Thanks!

Do LOOP until condition ‘terminated’ changed or complete until end.

1 Like

I only do filters on small lists. Like the list is already attached to the user and there are less than 100 items so it filters almost instantly. I haven’t had a problem as long as it’s not trying to filter my whole database or something like that. If it is a manageable list then I feel like filtering is the simplest way to go. I’m not sure how your database is set up though so maybe the other way is the way to go.

2 Likes