Forum Academy Marketplace Showcase Pricing Features

Cancel all workflows

Hi,

You’ve implemented a ‘cancel workflow’ in the logs section.

  1. Can you please add a ‘cancel all’ button?

When you run a workflow-on-a-list there can be hundreds or even thousands of scheduled items. Canceling one-by-one in these cases is not useful.

A ‘cancel all’ button would solve this.

  1. Can you please implement a basic ‘count’ function that shows a count of how many scheduled workflows exist right at the top of the chart (i.e. there are 2000 scheduled workflows).

Currently I have to just keep hitting ‘load more entries’ to get a sense of how many there are, and even then there is no precision to it as there isn’t any index/numbering etc.

Thanks very much!

Best regards,
P

We’ll have a look but you have all the tools to do that yourself in a dashboard of your app, if you store the scheduled ID

1 Like

Hi,

Do you mean the ‘unique ID’ of the thing that is available under all menus? Or something else?

P

EDIT/Update: Ok, yes, I see you mean the Unique ID. Will investigate.

Edit/Update#2:

  1. On second thought, I think you mean the Workflow ID. I don’t know how to store this in the DB, could you kindly elaborate?

  2. In any event, how can I cancel 4000 workflows already in progress that I didn’t have the foresight to store the IDs for?

Thanks,
P

You can store the ID when you schedule the workflow. The text returned by the action is this ID.

We don’t currently expose a way to cancel all workflows.

My workflow isn’t returning an ID. I currently have a Thing with datatype “WorkflowID” but it doesn’t store anything using ‘result of Step 2…’:

Any idea why it’s not returning an ID?

It’s a bit hard to help here without access to your app. If you open it and offer a link other Bubblers will have a much easier time helping.

Yes, it is odd. Here, I have created a demo that actually works (I’ll do some digging to see why my other application is having issues):

Test App Preview :slight_smile::
https://workflowtest1212332523.bubbleapps.io/version-test?debug_mode=true

Editor:

It appears that my current issue is when the workflow is processing a list (i.e. creating multiple API calls, which generate a handful of workflow IDs). I have tried everything including “add to list”, etc. Will update as I go through this.

Ok, narrowed it down: When running a scheduled API workflow on a list, there doesn’t seem to be a way to return workflowID in each run. It only appears to work on a single API workflow run (not a worfklow running on a list).

Yes - and as per my earlier post, when you do workflows on a list you can wind up with thousands of workflows in the log at a time. We need a way to cancel in bulk (not, say, 50 at a time).

A ‘cancel all’ workflows would be very useful.

P

I’m not sure I follow, I can found the result of previous action.

Correct, but it doesn’t store anything because we are executing an API workflow on a list. If you try the app I built, you will see what I’m talking about.
https://workflowtest1212332523.bubbleapps.io/version-test

The test on the left (workflow test on a single item) does store the workflow ID…however, the test on the right (workflow test on a list) does not. Although “result of step 1” also shows, nothing is stored because the workflow has multiple runs. We would need to be able to access the workflow ID from within the workflow so that we can write it to whatever item we’re running it on (as well as subsequent items in the workflow).

Can you try again? We just pushed a fix.

It does write the workflow IDs now; however, it only allows us to store the IDs in a text data field (as opposed to a ‘list of texts’ data field). The issue is that when we go to utilize “cancel a list of scheduled API workflows”, we cannot run that action on a text field (it must be a ‘list of texts’ field). Possible fixes that I can see include any of the following:

  1. Push a fix to allow the multiple workflow ids to be added to a list of texts rather than just a text field (currently, it still does not add them to ‘a list of texts’ field)
  2. Or, in the “cancel a list of scheduled API workflows” workflow settings, allow us to convert a text field to a list.

Thanks for getting on this so fast, this is great and will be a game changer in so many ways.

It returns a list of texts, not a text. What happens if you store it in a list of texts?

I just updated my program to try both. You can see here that my test app tries to store the Workflow IDs returned into both a text field and a ‘list of texts’ field:

When you run the app, you can see that the Workflow IDs were only able to be stored into the ‘text’ field…the ‘list of texts’ field remains empty:

we’re almost there :slight_smile:

Also, it looks like the editor even returns an error when attempting to store into a list:

Lists used to be limited (I think to 1000 items).

Has this changed?

P

Have you tried “set list” instead of “add list”?

Edit: and maybe

set list existing list merged with new list

1 Like

Well, “set list” did the trick! (slightly embarrassed I didn’t try that) Any insight into why “set list” worked when “add list” and “add” did not?

Props and thanks @mishav

Its a mystery to me, I can test “add list” and it works, yet it seems not to work in other situations.