botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
71 stars 83 forks source link

Strange behavior when node has transition pointing at itself #419

Closed dmk23 closed 5 years ago

dmk23 commented 6 years ago

Make sure these checkboxes are checked before raising an issue, thank you!

Please also fill in these fields:


Botpress version: 10.3.2

Channels: Messenger, Web

I have a node that captures user input, and then needs to loop to itself to present/ visualize this input and offer the user a chance to verify/confirm

Several problems happen when I try this setup

1) Flow Editor randomly loses the node transitioning to itself replacing it with "missing link". This happens if you make changes to flow after creating this self-transition

2) If I am able to save this "transition to itself", it does not work properly. The transition does NOT result in the node re-sending the "onEntry" contents based on the changed state. Instead it goes back to "onReceive" and somehow starts an infinite loop because the state does not merge right

What should be the right way to fix this? Should "transitions to itself" be allowed? Or should this be treated as a special type of transition? At the very least there has to be a UI fix...

dmytropanontko commented 6 years ago

@dmk23 you can simulate this behavior. image

dmytropanontko commented 6 years ago

@dmk23 Did you put node id here when try make self-transition ? image

dmk23 commented 6 years ago

@dmytropanontko I used the black button right under: Transition to Node, with a dropdown that I fixed in my PR: https://github.com/botpress/botpress/pull/891/commits/ef7ac8b1cd521d16b697b78185f81edfe2cb3376 . This creates a link that goes "missing" after further work on the flow

For now I am using a workaround re-routing to an extra/previous node with a condition, but the current behavior is clearly a UI defect

epaminond commented 5 years ago

@dmk23 , is it part of https://github.com/botpress/botpress/pull/891?

dmk23 commented 5 years ago

@epaminond no, I just side-stepped the issue, didn't really fix it

ThiliSew commented 4 years ago

Hello, I’m new to the botpress and I need to develop a product. I have to get data from the JSON file and show it in the chat. I’m in trouble to access data using the skill API call feature. I’m thankful if anyone can explain the process in detail. In my product, I cannot pass the parameters. Additionally, I cant understand how to do an auth request from API and get a token as a response.

Thank You.