Loop on a Loop that runs recursively - Backend workflows

Hello,

I am looking for a way to create a double loop that runs recursively :

  • I have created my “bottom loop” (create-terms-work-periods). It works fine
  • I have create the “top loop” (iterate-terms-works-periods) that looks like this :

From my understanding, in the “top loop”, the endpoints are executed asynchronously.
I’m looking for a way to start the next iteration in the “top loop” after the one before
I am looking for a way to make the next iteration of “top loop” waits until the one before is finished.

The problem I have is that in my “bottom loop” I am using condition on elements created in the previous iteration.

Many thanks

1 Like

Just put parameters onto the api endpoint to carry this data over

Thanks @boston85719, but it doesn’t seem to work since the first api endpoint and the ones after are all running at same time in the “top loop”.
The “create-term-work-periods” are running X times simultaneously
Maybe i am missing something.

Without seeing the actual workflows I have no other ideas

Hello @boston85719

Actually, it’s a basic loop on a loop :
For each X { (iterate-terms-works-periods)
For each Y { (ceate-terms-work-periods)
}
}


Since the only way to iterate in bubble is through API endpoints, the “iterate-terms-works-periods” is API Endpoint that calls “ceate-terms-work-periods” “X” times. The problem I have is that they run simultaneously.

Thanks in advance,

Yes, I’ve seen this screen shot before, but not the screen shots that would help understand how everything is set up

Schedule API Workflow create-term-work-period

Where is that? and what is the set up?

Here it is.

In step 2 I would like to put a condition on the previous run, but since they all run at the same time it makes no sense .