Jump to content

< Back to Forum


Vbs With Getall Should Wait Until Script End But Forwarding To Next Mo

  • Please log in to reply

#1 SupportTeam 03 December 2015 - 12:28 PM

Customer reported:


module VBS with getAll should wait until script end but forwarding to next module before transfer data: (vgEngine_VBS_not_wait.zip)

#2 SupportTeam 03 December 2015 - 03:55 PM

The short trace excerpt posted did not include what modules were ran beforehand - but it looks like there was another VBScript module that ran beforehand, and looks like it was not set to 'wait until complete' - so the Run_ResultReturn command from that module only was ran after the next module (the [get_all_data] module) already started.


If using multiple "Run VBScript" modules in script then care must be take to ensure that one Run VBScript module does snot affect the other.


Also its probably a better idea to combine multiple Run VBScript modules into one. That way the chance of functions ran from one module affecting another module are minimized.



085912.283  15  61  21 rem   Run_ResultReturn [forward] 7
085912.283  23  61  21 task  runscr Run_VBS vgm=483, file=, engine=[ClearScriptV8]
085912.283   7  61  21       NewVgsVgm_Goto end
085912.283  23  61  21       runscr strIni_moduleRunScript_Engine=ClearScriptV8
085912.283  15  61  21       q_scr +     cmdRun_ResultReturn 0

#3 Maciej 03 December 2015 - 10:38 PM

I use two VBScript module one by one both with option "Wait until VB Script completes".


First one is stopping recording and disconnecting bridge.

second one 

set vg = CreateObject("vgServices.CommandLink")
sReturnedData = vg.RvGet($RV[Conf_LineId_1],"RV[client_lineid]")
vg.Run_ResultReturn $RV[Conf_LineId_2], "[client_lineid]{" & sReturnedData & "}"
set vg = Nothing
and it looks like second one forwarding not waiting and forwarding immediately. 

#4 SupportTeam 04 December 2015 - 10:51 AM

Please post vgEngine trace that captures the entire call. Then it is possible to see what has actually happened.


Also, as advised before, using multiple 'Run VBScript' modules one after another is not good practice and it is recommended that callflows are not designed in a way that results in multiple 'Run VBScript' type modules ran one after another.


Adjoining 'Run VBScript' modules should be combined.



Above good practice approach is only recommend to ensure that multiple VBScripts are not started simultaneously and inadvertently interfere with each other. It is perfectly fine to have multiple VBScripts running on each line/channel - as long as they do not interfere with each other. This usually means that only VBScripts that do not access VoiceGuide's COM interface should be started with the "do not wait to finish" option.