octoblu / issues

The place to report Octoblu issues
3 stars 2 forks source link

Cannot forward messages from one flow to another flow #236

Open brianehlert opened 8 years ago

brianehlert commented 8 years ago

I added a second flow as a device in a sending flow. I send a message to a trigger in the sending flow. I filter that message. It is still in the format {{msg.params}} I then want to forward the message to the receiving flow. If I turn on "use incoming message" the receiving flow does not receive anything. I have tried various combinations (including empty) of the topic filter. If I turn off "use incoming message" then the receiving flow trigger is activated.

I need to send message data from one flow to the other.

ve6rah commented 8 years ago

I was trying to do this as well, I ended up using the HTTP Post from one flow to activate the trigger in the other flow. I'm not sure how you're supposed to be able to send between flows though, it would seem that if you can insert a flow in to another flow as a "thing" there should be some form of protocol for passing messages between them...

redaphid commented 8 years ago

So, the deal is this:

Basically, when you turn on “use incoming message”, it overwrites then entire message that’s configured in that edit panel

Including which trigger you’re trying to…trigger

In order to trigger a trigger, you need to send a message with a payload that has a “from” property that points to the uuid of the trigger, or the trigger’s alias.

here's An example of a message that works, and one that doesn't.

Notice the “from” property in the payload when you don’t forward the message.

I don’t think the UI should modify your message and add a “from” property, and in fact I don’t think it can. So I don’t know a good solution for this at this point

But, as a workaround, you can add the “from” key to the payload of the message and it’ll work.

You can also add aliases to triggers now, which should lessen that pain somewhat:

screen shot 2016-03-21 at 12 33 09 pm
brianehlert commented 8 years ago

While the workaround of adding the from:uuid or using an HTTP post to a trigger does work. It greatly limits sharing of the flows through bluprints - as both of these data items are considered static.

So the recipient has to know how to edit an HTTP POST url and know the correct one to select. and the same for entering the UUID of the correct device.

It would be an incredible usability enhancement to ae able to forward messages by dropping a flow, selecting the trigger, and add 'use incoming message'. this would work with blueprinting as well.