# Ensure Recursive Workflows Run in Sequence

**URL:** <https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678>\
**Category:** Questions\
**Created:** [May 14, 2022, 5:52pm UTC](https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678 "2022-05-14T17:52:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike35](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@mike35](https://forum.bubble.io/u/mike35)\
**Post date:** [May 14, 2022, 5:52pm UTC](https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678/1 "2022-05-14T17:52:17Z")

</div>

I’m creating a process where I’m using a recursive workflow to create a set of items. For a few reasons, I want to make sure that each item is created before the next one is added. One reason is that I need to check a running total to make sure that the batch doesn’t exceed the total.

Is there a way to ensure that a recursive workflow completes before running the next loop? I’ve added a second delay before kicking off the next workflow, but it doesn’t seem to be foolproof as sometimes I can tell the next iteration starts before the previous one was complete.

Or is there a better way to generate a set of items aside from using a recursive workflow?

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [May 14, 2022, 11:31pm UTC](https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678/2 "2022-05-14T23:31:15Z")

</div>

Hello @mike35

On the rescheduling action apply a condition where the creation step needs to be not empty

---

<div class="post-metadata">

**Author:** ![mike35](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@mike35](https://forum.bubble.io/u/mike35)\
**Post date:** [May 15, 2022, 1:33pm UTC](https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678/3 "2022-05-15T13:33:55Z")

</div>

Thanks for the help, @cmarchan. That doesn’t seem to work. I think it’s because I’m calling another backend workflow that performs multiple actions. The backend workflows run asyncronously, so the next steps won’t wait, right?

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [May 15, 2022, 1:38pm UTC](https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678/4 "2022-05-15T13:38:47Z")

</div>

Hello @mike35

Explore custom events. This helps with order of operations.

This post should help shed some light on this topic:

> [@Tip: Order of Operation](http://forum.bubble.io/t/order-of-operation/151699/2):
>
> Hey there, thanks for posting! If you’re interested in Order of Operations, you might check out this section of our Custom States tutorial: [How to Use Custom States | Bubble Tutorial - YouTube](https://www.youtube.com/watch?v=ydqXrIgTekE&t=185s) Then, here is some information about Bubble workflow logic: For efficiency purposes, workflows run in parallel across the server and the front end. Despite the names “Step 1”, “Step 2”, it is important to note that a given step does not necessarily wait for the previous one to complete before triggering …

---

<div class="post-metadata">

**Author:** ![mike35](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@mike35](https://forum.bubble.io/u/mike35)\
**Post date:** [May 16, 2022, 7:47pm UTC](https://forum.bubble.io/t/ensure-recursive-workflows-run-in-sequence/206678/5 "2022-05-16T19:47:07Z")

</div>

Thanks - however custom events can only take in one object as a parameter, correct? This is a limitation I’ll need to work around.
