jumpTo a specific node doesn't wait for the user input, continue the flow, creates a failure and an infinite loop

Hey everyone,

I created an action to jumpTo to a specified node in the current flow. The jumpTo action does take me to the specified node with an “always” transition to a choice skill. But instead of waiting for user input, the skill choice continues the flow and (I believe) use the last value used in the previous choice skill. That last value being incorrect, lead to failure and then an infinite loop. Maybe I should reset the choice skill (not sure how) or I am doing something wrong?

My code:

async function hook() {

const currentFlow = event.state.context.currentFlow
const nodesBack = temp.nodesBack

bp.logger.debug(`****Target flow: ${currentFlow}`)
bp.logger.debug(`****Target node: ${nodesBack}`)
bp.logger.debug('Event parameter:', event)

const sessionId = bp.dialog.createId(event)
await bp.dialog.jumpTo(sessionId, event, currentFlow, nodesBack, { next: 'wait_user_input' })
await bp.dialog.processEvent(sessionId, event)

// const lastInteraction = event.session.lastInteraction

// if (Date.now() - lastInteraction > 60000) {
//   await hook()
// }
return hook()

First time posting here, I hope I followed the rules. Thanks in advance.

Hi @boyoma !

The team is really happy to help with your V12 question. However, this is our Botpress Cloud community Forum. Please copy and paste this paragraph + code to this Forum; our V12 team will gladly help! :handshake:

Hey Sabrina, thanks for the reply.

Just curious, why are you saying it is a v12 question? Is it because I’m not on the cloud?

The thing is that the cloud studio kept having bugs (which you fixed recently with the browser based studio). For that reason I downloaded the v12 and the intention is to move to the cloud later-on. But I just learned the old interface and you completely revamped the design of the cloud interface. Plus all tutorials refer to the old interface. So for now, I want to finish my flows in v12.

Long story short, answering here wouldn’t help both cloud and v12 users? To be honest, I myself use both to search for solutions. Also nobody is answering there :yum:

Hey @boyoma !

SDK is for V12 users, so that’s why I knew you were not on the cloud. :eyes:

Someone will answer your question on the V12 forum. Please share the link of your question with me if no one answers within 72 hours.

Botpress Cloud bugs have been fixed, and more tutorial videos will follow as we keep adding features. Feel free to give the Cloud another try. :handshake:

Thank you Sabrina.

Well, it has been 5 days. It seems there is no activity when it comes to reply to questions. Here is the link: https://github.com/botpress/botpress/discussions/12500

If it wasn’t chatGPT to get answers I would have gave up already :yum:.

Hi @boyoma ,

There is another team who supports v12; I have forwarded your GitHub discussion URL to them.

I hope they answer you soon :slightly_smiling_face:

1 Like