# RBE not “working” as I thought

**URL:** https://discourse.nodered.org/t/rbe-not-working-as-i-thought/9828
**Category:** General
**Created:** [6 April 2019 09:20 UTC](https://discourse.nodered.org/t/rbe-not-working-as-i-thought/9828 "2019-04-06T09:20:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mambui](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mambui](https://discourse.nodered.org/u/mambui)
#### Post date: [6 April 2019 09:20 UTC](https://discourse.nodered.org/t/rbe-not-working-as-i-thought/9828/1 "2019-04-06T09:20:10Z")

</div>

Hi guys, I am quite confuse with the RBE function.  
My flow works with standardized buy/sell information from twitter.  
Before using the RBE function, my flow was working well. A buy info sends a buy order. A sell info sends a sell order. With RBE, when the information "buy" is coming through the flow the RBE works well. However, when the information is "sell", the system opens a "buy" order.  
Thank you very much for your precious help.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/92a413fdde8eeeddb9e61aa5d1e533bb17e311e1.png)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [6 April 2019 09:32 UTC](https://discourse.nodered.org/t/rbe-not-working-as-i-thought/9828/2 "2019-04-06T09:32:02Z")

</div>

Add a debug to see the messages going into your RBE function as well as those leaving.  
That you can work out what the RBE node is doing.

But without knowing what your functions are doing and seeing the debug messages it is hard to advise you.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [6 April 2019 11:02 UTC](https://discourse.nodered.org/t/rbe-not-working-as-i-thought/9828/3 "2019-04-06T11:02:55Z")

</div>

I'll bite.

I've run into problems with RBE in the past too.

But looking at how you have things wired up, I would suggest something more like:  
(Excuse the pathetic hack with the layout. I am not good with the paint programs)

Though I don't know it will solve **all** your problems, it may help you understand what is going on more than it is now.

Also add another `debug` node after the second `RBE` as you did when there was only one.  
(I didn't want to make an even bigger mess adding the second one on the picture.)  
Or use the one, but connect the outputs of both `RBE` nodes to it.  
I think it would be better with two `debug` nodes though. It helps keep the messages separate.

 ![Screenshot%20from%202019-04-06%2021-55-38](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bb823cc86124184c98e5b962450d627c51e07570.png)

---

<div class="post-metadata">

### Author: ![mambui](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mambui](https://discourse.nodered.org/u/mambui)
#### Post date: [6 April 2019 12:09 UTC](https://discourse.nodered.org/t/rbe-not-working-as-i-thought/9828/4 "2019-04-06T12:09:54Z")

</div>

Incredible! I have tried multiple set up since early this morning, but the one you mention work perfectly.  
Thank you both Ukmoose and trying\_to\_learn for your precious help.
