Max number of steps in a Workflow

Hello Bubble community,

On a page in my app, the user can enter information regarding a rental contract (start date, end date, rent amount, etc). Once we click the button “Create Contract”, there are a lot of steps regarding the amount received for a specific month.

Example: we create the following rental contract:
Start date: 23 July 2020
End date: 23 July 2025
Rent amount: 500

In this example, when we click the button “Create Contract”, each month from July 2020 up to today (July 2024) will receive the amount 500. The other months (Aug 2024 to July 2025) will remain empty as the rent has not been received yet.

My app is working properly for 8 years (I mean that there is 8 years between Start date and End date). But if we put 9 years (it does not work and all month amount are empty). Strange.

I am struggling to understand why… Maybe there is a maximum number of steps per Workflow?

PS: the max contract duration that I need my app to work for is 9 years.

PS: here is what I do in the workflow (for 108 months (= 9 years):

Thank you for your help,
GT

Hi,

To my knowledge there is no limitation in term of number of steps a workflow can have.
However, that being said what we see here is surely is the opposite of a best practice. Having so many steps is a nightmare to program and will be even worse to maintain in the future.

Also, if we are talking about a front-end workflow, keep in mind that the more long it takes to run the less reliable it is.
As it run in the front-end, if the user loose internet ot close his tab or shut down the browser mid-workflow : it stops running. This is no good if we deal with incoincing and payment stuff.

I am sure there are better ways to address what you need to do. Would you like to elaborate on what your requirements are?

Right off the hat I believe backend reccuring workflows might be better solutions for this kind of reccuring invoicing stuff.

1 Like

Hello :slight_smile: Thank you for your message. I put the first 50 steps (for 50 months) in the front-end workflow and the remaining 58 steps (58 months) in the back-end workflow. I will put them all in the back-end workflow and see if it helps. Thank you!

If you have 50 steps in a workflow, you’re doing it wrong :slight_smile:

You need to generate a list of months (dates) between these dates.

Then, schedule API workflow on the list of dates, scheduling a backend workflow that Creates a new Contract using the date sent to the backend workflow.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.