Forum Documentation Showcase Pricing Learn more

How to know when a workflow ends?

I was wondering if, by any mean, it was possible to know when a scheduled workflow ends.

I’m running a “schedule workflow on a list” task and I’d like to trigger an event when the last workflow on this list has terminated.
I tried something with the workflow IDs:
1st- adding them in a list
2nd- remove each workflow ID just before the end of the workflow
3rd- trigger an event when the list is empty
The problem is that when an error occurs, the ID is not removed.

Anyway, this solution seems really overkill and I’m pretty sure there’s something I’ve been missing.

Instead of scheduling a workflow on a list, I would recommend to run the workflows recursively.

You can count your list items on initialization and hand over a counter number recursively. When the counter = list item count, it is the last item.

2 Likes

Wow, didn’t even know you could run workflows recursively!
Thank you for the tip, this will definitely do the job