So traditional function structures in object oriented programming are crudely like this:
function (obj A, obj B, obj C, …)
{
Implement a set of actions using A, B, C etc.
}
return obj X
In contrast custom workflows in bubble where you can send a parameter is like this:
custom workflow (obj A a.k.a type of thing in bubble)
{
Implement a set of actions using A
}
return null
Feature request:
If we can pass more than one parameter to custom workflows we can make bubble modular + powerful like:
custom workflow (obj A, obj B, obj C, obj D)
{
Implement a set of actions using A, B, C, D
}
return null
If we can return an object (optionally) back to the main workflow which triggered the custom workflow then its gonna make bubble truly modular and 10x powerful. The main workflow can wait for the object to return before proceeding to next action within the main workflow.
There are workarounds today in bubble:
Make api workflows which are lot like traditional function structures. Use them instead of custom workflows.
Create a element on page which stores all objects B,C,D etc. in custom states. So when you want to trigger custom workflow you can pass the obj A directly as Type of thing and in the workflow read data from custom states of that element on that page. As you may have already guessed you’ll need to change the element states in main workflow everytime to ensure right objects are being passed
But having the custom worfkflow do all that would make life on bubble much leaner and easier even from how easy it is currently.
This idea is quite old. As Gaurav mentionned, passing several parameters to a function is fundamental in programming.
Visual programming works the same
Any chances that we see such feature in a near future?
Hey @julienallard1,
I actually ended up building this myself. I made this available to other as part of the utilities (bdk) plugin. Check out the 'super workflows’ functionality
Yeah I tried it and also ended up building a similar plugin (still in private mode) for myself, but these are really a workarounds. Some of the limitations:
The super workflow that is called in the middle of a workflow will still be executed at the end of it which sometimes destroy the process.
As opposed to custom workflows, super workflows can’t have customized field names. We’re stuck with “This Super Workflow’s Field 1’s Value”
We have to add, name and maintain an element for each workflow.
I understand that these limitations are due to the boundaries imposed by the plugin editor. That’s why the original idea of this post would be very great.
In what I’ve experimented, a workflow setup like in this dummy example won’t work because even if the super workflow is called before the “Action on List A”, it will be ran after it since it’ll wait for the custom workflow to end before executing.
Hi there - just released a new feature that allows you to have multiple parameters on custom events. Check it out here: Multiple parameters on custom events