Variables (custom state) in API workflows

Custom Event’s in reusable elements should be able to do the job.

Unfortunately, Bubble isn’t built so that custom events behave like functions, or even like callable procedures for that matter. (Sorry, but I have to fall back on some terminology from ancient languages like Pascal.)

One specific problem with custom events is that they don’t support a defined interface. In other words, it’s not possible to define a list of parameters that can/must be passed to the event. Neither is it possible to define a result value returned from the event as is the way of functions.

API Workflows implement parameters fairly well:

image

The big problem with API workflows is that they run on the server with no return signal to the client (the calling workflow). And API workflows, as discussed above, don’t even support local variables (custom states), so their calculating ability is severely limited.

Perhaps after I finish launching my app and have more time, I’ll document the ways Bubble comes up short on reusability. (Somehow I figured the fundamental nature of object-oriented programming would be reflected in Bubble. I guess we’ll have to wait for Bubble++. :slight_smile: )