I'm sure you did this, but just to make sure... you defined the variable in ComposerRoot.vxml AS WELL AS listing that file in the Entry block under Global-->ApplicationRoot.
Example: "../src/ComposerRoot.vxml"
You sub callflow must also have the same file/path in the Entry block's global-->ApplicationRoot value.
When you use this variable in an assign block, Composer will append 'root.' to the beginning. So referencing the value of global variable 'myGlobal' should look like this:
AppState.myVar = root.myGlobal
Let us know if this resolves your problem, or what your work-around is.
Passing variables between scripts eliminates the need for having global variables though, like Jorge said. When passing variables, I would use the same name in the Main script and the sub callflow. Make sure you changed the 'Category' of the variable in your sub callflow to 'Input', then put it in the Exit block of the sub callflow to pass it back (and SAVE so that your main callflow can see it). Once you do that, open the Subdialog block in your main callflow, click on Parameters and Composer will recognize it as input/output.
Happy Coding!
------------------------------
Todd McCall
Bank of America
------------------------------
Original Message:
Sent: 10-13-2019 05:11
From: Omar Elhawary
Subject: Composer Root Logic
im trying to define root global variable in composer GVP application
first of all the variable is shared, but its value not shared, anybody know how to make it shared?
also i tried a lot of work around, but composer root actually ignores any tag else var tag when i debug.
Appreciated :)
#Unsure/Other
------------------------------
Omar Elhawary
------------------------------