Problem with session attributes : Session attributes get reset or all removed when using it inside the Dialog Delegate intent

amazon-alexa

#1

A value is saved to session attribute during LAUNCH INTENT.
But it is not retained when dialog delegate intent is called. But it is working fine in all other basic intents.

Below is the snippet of what i have tried.

 LAUNCH() {
        this.setSessionAttribute('launch', 'called success')
        console.log(`Launch intent`)
        this.ask('Welcome to dialog demo.')
    },
ThankYouIntent() {
        console.log(`ThankYouIntent`)
        console.dir(this.getSessionAttributes(), { depth: null })
        this.ask('Thank you for using this skill.')
    },

DemoDialog() {       
        console.log(`DemoDialog`)
        console.dir(this.getSessionAttributes(), { depth: null }) // Here session attributes are empty when user enters this intent.
        this.ask('Thank you for using this skill..')
    },

In short, able to access session attributes intents that doesn’t have auto delegation enabled. Unable to use within the Intent that supports auto delegation.

Language : NodeJS
Jovo CLI Version: 2.2.3

Jovo packages of current project:
jovo-cms-i18next: 2.2.1
jovo-core: 2.2.1
jovo-db-filedb: 2.2.1
jovo-framework: 2.2.2
jovo-platform-alexa: 2.2.3

Any help is appreciated. Thank you for your support.


#2

Is there anything else that these intents do? How do you call the dialog delegates?


#3

Hi, thanks for response.

These intents do nothing other than saving and printing the session attributes. Calling the dialog delegate from backend this.$alexaSkill.$dialog.delegate() and disabling the overall auto delegation in VUI with fallback to skill setting enabled.