--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/7WwDOEwD7yc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.
| Jean-Philippe Encausse - R&D / IoT / Innovations http://www.encausse.net - http://arm-avocats.fr Twitter: @JpEncausse - Mob: +33 6 82 12 56 99 Do it Once, Use it Twice ~ Do it Twice, Make It Once |
I understand a node cannot pick where to send things, however it can publish a message with a specific topic. Therefore, I am thinking of creating a dispatching node that “calles” a subflow by publishing a message with the target subflow name as the topic. The subflows would all start with an AMQP subscription. This approach is acceptable to me but I don’t like the fact that the message would need to leave the node-red process boundary when it is publishes to RabbitMQ.
Is there a way to do a pub/sub pattern on node-red without leaving the node-red process boundary?
-Tony
A node sends its messages to the nodes it is wired to - it cannot pick where to send things.In 0.14 we added the 'link nodes' that let you create virtual wires between flows (possibly between tabs). That would be one option available to you.Nick
On 31 August 2016 at 21:27, Jean-Philippe Encausse <jp.en...@gmail.com> wrote:
Hi,May be a n00b question, is there a node that can dispatch it's message to an other flow ?I see in previous post something about "subflow" ?
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
Maybe there is something about links that I don’t understand. Let me describe better what I am trying to do and you tell me if I can use links.
I want to create an app can generate a subflow based on user input and then push that subflow out to my node-red instance. I would use the node-red API to automate the import of this subflow. Let’s call this user-subflow.
On my backend node-red instance I have a dispatcher-node that receives messages from RabbitMQ. The Rabbit message contains within it the name of the target subflow to execute. The dispatcher-node must apply common business logic and then call the appropriate user-subflow based on the subflow name contained within the message.
The challenge I see with Links is that links are created at development time, I want to create a node that can call a subflow created at runtime.
An alternate approach would be to create a script that can import the subflows and update a switch node dynamically. However, I don’t like this approach as well because the dispatcher node IS created at development time and is managed in git and I don’t really want the master copy in git to be different from the runtime copy.
Your help and ideas are appreciated.
The need for late binding has many valid use cases. In my case I think it boils down to the fact that I can’t wire things up at development time because the user-subflows don’t exist yet. The user-subflows are created at runtime in the app. I don’t want to give my user an empty node-red pallet, rather I need to ask them questions in the context of the business domain and generate the flow for them. I guess I want to use node-red as dynamic rules engine.
I will rethink my approach but I do believe the ability to either dynamically call a subflow from a node or the ability to do pub/sub within node-red’s process boundary which in effect would be a way to call a subflow would be useful.
Thanks,
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/cfe40143-bfa3-41fa-a9bf-9a8e1f58db41%40googlegroups.com.