How awesome would it be if subflow could have buttons like inject/debug? Is this something that could be done in a future release?
I seem to recall that the reason this hasn't been implemented yet is aesthetic - if there's a button there can't be an input.
I remain in favor of the idea but it must be remembered that an injection button only replaces an inject
node.
Problem with inject node is how misleading it looks. Let's say you want to trigger a message. Now you add inject node into the subflow. The subflow interface now has an input. Which indicates it supports/requires taking input messages. But that's not thecase, because it's only meant to trigger a debug message during development/testing.
However, the cron-plus node does have button (to trigger) and input. So a node certainly can have both?
What behavior do you want to achieve with this button (on each subflow instances)?
Ideally it would have to be dynamic, so left side could inject empty message. Right side could set a variable true/false. This way I could trigger test messages without changing the interface. To avoid giving impression that the subflow takes/requires input. Further, with a right-button, it could enable/disable debugging inside the subflow, just like normal right-button for debug node does. I'm sure there are thousands of other usecases too.
Take a look at cron-plus node for how combination of input and button is used today.
Putting an inject node directly into the Subflow will have the same effect.
How do you trigger that inject node?
Right, I forgot this story and I don't remember why this choice.
Sorry, the only Subflows I have are the ones I use to develop the core
Ok we use subflows frequently as a sort of multi-node "function". Some require input, others don't (they generate their own input instead).
Of course you COULD trigger a message if you wanted to with inject node, set a timer every minute or once on deploy. But that makes it extra hassle to add, configure, then remember to remove when done. All of which would be solved by a simple button. That so many nodes already have. Like inject (without input). Or cron-plus (also with input).
Having the option of both left-button AND right-button would be even better. Toggle debug or other dev/debug logic inside.
I get that this is not necessary in majority of use cases. Still, it would be super useful in more cases than I can count.