Author Topic: Usage of root variables on GVP  (Read 7250 times)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Usage of root variables on GVP
« on: March 02, 2015, 12:33:42 AM »
Hi guys,
I was doing an idea on a project and faced an issue which tried to handle with root variables, but GVP resets the value to original one every time it changes scope. Meaning, if you update value on subcallflow it won't return to main callflow updated, main callflow will have the original value as was on the root.vxml file.
Wonder then, what is the point of having root variables then?

Tried then to work with sessions and another pain in the ass. Ended up doing it via DB...

Who has used root variables and a success case? Can't see the use of this if it doesn't allow the whole project to use the variable.

Ideas?
Thanks!

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Usage of root variables on GVP
« Reply #1 on: March 02, 2015, 08:56:14 AM »
How are you using,declaring and passing the root variables to the another form?Could you attach "hello world" sample of your vxml app? It is working, but there are some pre-requisities according to the VXML definition.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Usage of root variables on GVP
« Reply #2 on: March 02, 2015, 02:16:22 PM »
On normal VXML should work I think, but I am talking about GVP specific implementation.
Updated values are not sent to main callflow or viceversa. If I'd use parameters for the subcallflows or return values would make no sense to have "root" variables, better use simple local variables.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Usage of root variables on GVP
« Reply #3 on: March 02, 2015, 02:20:11 PM »
So, you mean some specific attribute from extended Genesys namespace? If yes, which one? For data passing is not necessary to use extended namespaces.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Usage of root variables on GVP
« Reply #4 on: March 02, 2015, 02:50:02 PM »
Have you used this function before on GVP?

1. Create Main callflow
2. Declare Application Root file (sample.vxml with var a1 with initial value XXXXX for example on src folder )
3. Now you have a var a1 available (accessible by application.a1)
4. Call a sub callflow S1
5. Declare same Application Root file
6. Now you also have a1 variable available
7. On S1 update variable a1 to value YYYY (application.a1 = 'YYYY')
8. Return to main callflow
9. Check value (print, prompt, etc) of variable a1
10. a1 outputs XXXXX instead of YYYYY



Offline ankur_khurana01

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Usage of root variables on GVP
« Reply #5 on: April 07, 2015, 10:04:59 AM »
[quote author=cavagnaro link=topic=8740.msg38817#msg38817 date=1425307802]
Have you used this function before on GVP?

1. Create Main callflow
2. Declare Application Root file (sample.vxml with var a1 with initial value XXXXX for example on src folder )
3. Now you have a var a1 available (accessible by application.a1)
4. Call a sub callflow S1
5. Declare same Application Root file
6. Now you also have a1 variable available
7. On S1 update variable a1 to value YYYY (application.a1 = 'YYYY')
8. Return to main callflow
9. Check value (print, prompt, etc) of variable a1
10. a1 outputs XXXXX instead of YYYYY
[/quote]

Were you able to find the solution of this issue? I am also trying to do the same in my sample application but it seems that I will also run into same issue while running the application.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Usage of root variables on GVP
« Reply #6 on: April 07, 2015, 01:10:46 PM »
Well I had to add the root file to ALL flows, no matter if variable was used or not.

Offline ankur_khurana01

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Usage of root variables on GVP
« Reply #7 on: April 08, 2015, 06:36:21 AM »
[quote author=cavagnaro link=topic=8740.msg39099#msg39099 date=1428412246]
Well I had to add the root file to ALL flows, no matter if variable was used or not.
[/quote]

Got it!!! Thanks a lot.

Offline ankur_khurana01

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Usage of root variables on GVP
« Reply #8 on: April 09, 2015, 09:46:13 AM »
Can you please confirm if below understanding is correct?

My understanding:
By using the concept of AppRoot in sub-callflows, the variables declared in AppRoot will be available in sub-callflow. If I change the value of these variables in sub callflow then the changed value of the variable will be available in main flow (or calling flow file).

Regards,
Ankur Khurana


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Usage of root variables on GVP
« Reply #9 on: April 09, 2015, 02:54:19 PM »
As long as you use the root file on ALL (ALL) callflows (vxml) called. If you miss one, sequence will be lost.

http://voice.cs.vt.edu/docs/prm_files/rootdoc.html

Offline rajt4

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Usage of root variables on GVP
« Reply #10 on: April 10, 2015, 01:55:27 PM »
Hi I am new to this forum,

I have worked with IVR Composer applications, You have to mention approot.vxml in every subcallflow but that will only let You use the root variable in the subcallflows it wont maintain the status from the parent callflow, one work around is to use GOTO instead of subdialog block. Another work around is to declare object in java script add all Your variables to the object and pass that as input and output to all the subcallflows. hope that helps.

-Raj. 

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Usage of root variables on GVP
« Reply #11 on: April 10, 2015, 05:47:09 PM »
Which Composer version you used?