Hey guys
I am using bubble connected to an external database and I perform a lot o API GET and POST to this database.
Now I am facing a curious situation.
During an workflow i perform 2 different calls to this database, one to GET and another to post, but during this workflow a lot of checks are done and if not approved, the workflow if terminated (before the API of Post).
But don’t matter if is terminated or not, the post are performed.
Appears the external API are running all in the beginning of the workflow and not in the correct moment.
Someone is facing this ?
in purple is the get external api
in red is the moment the worklow is terminated
in green is the post external api who is performed anyway
You may want to read the section of the manual called execution rules.
Basically the actions in your workflow are asynchronous and the order of execution is not guaranteed.
The manual explains how to better handle this. One common practice is using multiple custom events because when you trigger a custom event the workflow await the end of the execution of the event before executing the next steps.
Thanks for the feedback man !
I am using bubble for more than 2 years and never had any problem like this, but now i am building a full complex app with the complete backend out of bubble, the api call really break the sequence and is need to create breaks using the custom events or create a cascate of custom events, becase the calls of api start immediately when the workflow start (until a custom event is called)
Tks
1 Like