To increase reuse of nodes it would be intresting to see a feature where it would be possible to create a node that is a mirrored copy of another node in terms of properties (except from properties that describe inteconnection and placement of such as id, wires,x,y,z).
Subflows is good for doing this when there are many nodes involved to combine a result, but it is cumbersome if for example one just want to reuse a function block or a change node.
Or is there some other functionality which can accomplish whats described above conveniently within Node-RED?
link in and
link out nodes?
Thats a valid solution as well but I think the flows will be very hard follow especially since the link in / link out names are not displayed unless you hover the mouse over them.
The problem with using link nodes for this kind of thing is when you call the shared flow/functionality from multiple places, the result goes to every link out node requiring you to filter out unwanted values etc. I suspect the OP needs something akin to subroutine where the execution returns to the output of the callee.
I would prefer this functionality to be built in (perhaps a feature of the link nodes) but in its absence, I use node-red-contrib-components which does this.
You can set an option on the link nodes to show their name.
Thanks Steve-Mcl for both your replies
We have had this on the backlog for a while - Link Call node
Oooh. Never spotted that one. Nice.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.