Hi,
I have created a number of API workflows to delete data items and cleanup any child items or related items. A top level call (e.g. to delete a company) can trigger a fairly large number of other API workflows , that may in turn trigger some more workflows. I have checked the logic and it seems sound. However not all elements get deleted. It looks like the third level (and beyond) of API workflow don’t get called for some reason. This leaves me with a lot of residual items in the database.
Am I running into a known limitation of bubble here?
Douwe
I dont think there is any limitation with bubble for this.
Many times when the level gets deeper, our brains cannot think through the loop process properly.
Try doing a test to see why it is not calling. You can do some ‘create a new thing’ action with some test data type to be able to see what is happening. You can also check your logs.
If everything is structured correctly, it will always work.
I use the workfow API for all CRUD logic i.e., to create, delete, edit, and update datatype
I have noticed that they work well if the relationships between Datatypes are unidirectional. I have gone as far as the third level
Riccardo
There are no depth limits that I’ve come across and I’ve built some very complex workflows requiring a lot of depths and logic.
There is a limit to the number of api workflows that can be scheduled at one time (100k I think?)
Your issue is likely stemming from a timing issue as api workflows run concurrently to try and process as quickly as possible. Likely what is happening is the reference data is being deleted before all the child data is deleted so searches of the child data are empty when they should exist.
ie you can’t find parents children if the parent is now unknown/deleted.
1 Like
Probably you are deleting the main item Before doing all child items. Do child items First and main item Last