VoiceGuide IVR Software Main Page
Jump to content

Vbscript Sometimes Does Not Get The Value Of A Result Variable

Recommended Posts

Dear Support,

 

My IVR script fails once a while because the expected Result Variable returns nothing.

 

I created a script that generates selection list from DB and receives a choice from the user. So, when a user needs to select a choice, the process goes to this selection script (named like VPS...), gets selection, confirms the selection, then comes back to the main screen.

 

The problem is that it sometimes fails retrieving the result variable, Selected[optionName]ID, even after the confirmation is performed, which means the ID was verified by the user and the RV should be available.

 

I could not reproduce the problem so I am attaching the long log file that contains this problem. (Sorry about that.)

It happens at the second call from the bottom where you can see bunch of ".ExitTime returned error."

 

I am also attaching my VB script and the compiled version of the script. The problem is that $RV[selectedSickStatusID] is empty and it is supposed to be 4.

 

Please let me know. If you are able to find out the cause I would be really happy!

 

Thanks for your great support again.

EmptyRVError.zip

Share this post


Link to post

The $RV[selectedSickStatusID] is not defined on this call. You can confirm this by just looking at the vgEngine trace. The list of RV's defined when the VBScript is started is attached below.

 

Recommend that in your VBScript you change:

 

RV_TargetAutoSickStatusID = $RV[selectedSickStatusID]

 

to:

 

RV_TargetAutoSickStatusID = "$RV[selectedSickStatusID]"

 

(just add the quotes) then the VBScript will not crash due to Syntax Error when $RV[selectedSickStatusID] is not defined. Then also add something like this to confirm in vgEngine trace that RV_TargetAutoSickStatusID is not defined:

 

if RV_TargetAutoSickStatusID = "" then

vg.Admin_TraceLogAdd $RV_LINEID, 0, "***** RV_TargetAutoSickStatusID was not set! *****"

end if

 

 

The $RV[selectedSickStatusID] is only defined in the last call in the trace:

 

174100.726 27 1 rem RvSet SelectedSickStatusID, 4

 

and that call seems to complete OK.

 

 

Here is the RV list for the second last call:

 

173524.704 6 1 state [ProcessAutoSick] type: VB Script, iRunWait=2

173524.704 6 1 rv replace start (strlen>500)

173524.704 6 1 rvns: [PathSysVoice]{C:\Program Files\VoiceGuide\system\voice\}[PathApp]{C:\Program Files\VoiceGuide\}[PathDataVm]{C:\Program Files\VoiceGuide\data\}[PathVgSys]{C:\Program Files\VoiceGuide\system\}[scriptPath]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\}[scriptsPath]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\}[$RV_STARTTIME]{2009-04-14 17:33:52}[$RV_DEVICEID]{1}[DlgcVoice]{dxxxB1C1}[DlgcNetwork]{dxxxB1C1}[$RV_CIDNAME]{}[PathApp]{C:\Program Files\VoiceGuide\}[scriptsPath]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\}[$RV_CIDNUMBER]{}[CheckTaskType_ResultReturn]{success}[isHiringRequested_Inpu

t]{"" = "true"}[isHiringRequested]{False}[isBroadcastingRequested_Input]{"" = "true"}[isBroadcastingRequested]{False}[PlayWelcomeGetEmpNumber]{4993}[PlayWelcom

eGetEmpNumber_PathTaken]{success}[WelcomeGetPassword]{55555}[WelcomeGetPassword_

P

athTaken]{success}[blnIsAuthorized]{True}[blnIsMultipleAppointment]{False}[blnIs

E

mpNumberValid]{True}[blnIsPasswordExpired]{False}[blnIsLocked]{False}[intRetries

]

{2}[intNumberOfAppointment]{}[intRetriesTemp]{3}[isAuthorizedFirst_Input]{True=T

r

ue}[isAuthorizedFirst]{True}[isLocked_Input]{False=True}[isLocked]{False}[isPass

w

ordExpired_Input]{False=True}[isPasswordExpired]{False}[isForHiring_Input]{"" = "true"}[isForHiring]{False}[isForBroadcasting_Input]{"" = "true"}[isForBroadcasting]{False}[isReserved]{False}[userID]{93177}[CheckReservat

ion_ResultReturn]{Success}[isReservedForHiring_Input]{False = True}[isReservedForHiring]{False}[userID]{93177}[GroupID]{211}[MainMenu]{WAV Files\Main Menu_01.wav,WAV Files\One To Punch_01.wav,WAV Files\ScheduleInfo_Menu.wav,WAV Files\Call In Sick_01.wav,WAV Files\Leave Functions_01.wav}[PunchStyle]{General}[PayCodeForSick]{Sick}[PunchID]{2}[Earlies

tStart]{}[blnIsEarliestStartViolation]{False}[blnIsPromptForLeaveSet]{False}[use

r

Role]{1}[isAllowedPhoneNumber]{true}[DCDID]{-1}[CheckCallerIDForLocation_ResultReturn]{success}[isAllowedIncomingNumber_Input

]{true = true}[isAllowedIncomingNumber]{True}[GetMainMenu]{5}[CheckEarliestStartViolation

]{False}[isEarliestStartViolated_Input]{False=true}[isEarliestStartViolated]{Fal

s

e}[isFullDetailSelected_Input]{"General"="Full Detail" and 5=1}[isFullDetailSelected]{False}[scriptEnd_Time]{2009-04-14 17:34:19}[scriptEnd_Goto_Script]{CallInSick.vgs}[scriptEnd_Goto_Module]{GetShift

ForAutoSick}[scriptStart_Time]{2009-04-14 17:34:19}[scriptStart_CalledFrom_Script]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\Login.vgs}[scriptStart_CalledFrom_Module]{GotoScriptSelected}[scriptsPath]{

C:\Program Files\VoiceGuide\Scripts\IntelliTime\}[GetFullDetailSubMenu]{}[sickSchduleInfo]{Job Name, Firefighter.

Location, Station #2.

Beginning on, April Fifteenth 2009, 8, A.M..

Ending on, April Sixteenth 2009, 8, A.M..

}[isMultipleStatusAvailable]{true}[shiftID]{95007}[isMultipleStatus_Input]{true = true}[isMultipleStatus]{True}[scriptEnd_Time]{2009-04-14 17:34:44}[scriptEnd_Goto_Script]{SelectionControl.Vgs}[scriptEnd_Goto_Module]{Ge

nerateListOfSelection}[scriptStart_Time]{2009-04-14 17:34:44}[scriptStart_CalledFrom_Script]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\CallInSick.vgs}[scriptStart_CalledFrom_Module]{StartVPS_SickStatus}[scripts

Path]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\}[VPS_QryString]{EXEC dbo.isp_ScheduleRetrieveUserAllowedStatuses 93177,1}[VPS_ReturnScript]{CallInSick.vgs}[VPS_ReturnModule]{PrepareRecordingFor

SickReason}[VPS_NullSelectionErrMsgPath]{CallInSick_ErrNoStatus.wav}[VPS_Selecti

o

nNameFilePah]{Wav Files\CallInSick_SelectStatus.wav}[ReturnName]{SickStatus}[VPS_FilePath]{Temp\1_SelectionTTS_}[VPS_IDList]{4,3,50,57}[VPS_ValueList]{Sick,Vacation,Funera

l,Test- Kelly}[VPS_SelectionTotal]{4}[VPS_Counter]{1}[VPS_NullSelectionErrMsgPath]{}[sel

ectionCounter_Input]{0}[selectionCounter]{0}[VPS_Counter]{0}[initSelectionCounte

r

_Input]{VPS_Counter + 1}[initSelectionCounter]{1}[VPS_Counter]{1}[isSelectionNameAvailable_Input]{"Wav Files\CallInSick_SelectStatus.wav" <> "Wav Files\"}[isSelectionNameAvailable]{True}[PlaySelectionName]{}[PlaySelectionName_Pa

thTaken]{timeout}[PlayPressGetSelection]{}[PlayPressGetSelection_PathTaken]{time

o

ut}[PlayValueGetSelection]{}[PlayValueGetSelection_PathTaken]{timeout}[CheckEndO

f

Selection_Input]{1 = 4}[CheckEndOfSelection]{False}[selectionCounterIncrementer_Input]{1+1}[selection

CounterIncrementer]{2}[VPS_Counter]{2}[CheckEndOfLoop_Input]{2 > 4}[CheckEndOfLoop]{False}[PlayPressGetSelection]{1}[PlayPressGetSelection_PathTa

ken]{timeout}[PlayValueGetSelection]{}[VPS_Counter]{0}[PlayPressGetSelection]{}[

P

layValueGetSelection]{}[PauseGetSelection]{}[scriptEnd_Time]{2009-04-14 17:35:01}[scriptEnd_Goto_Script]{CallInSick.vgs}[scriptEnd_Goto_Module]{PrepareR

ecordingForSickReason}[scriptStart_Time]{2009-04-14 17:35:01}[scriptStart_CalledFrom_Script]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\SelectionControl.Vgs}[scriptStart_CalledFrom_Module]{GoBackToMainMenu}[scri

ptsPath]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\}[PrepareRecordingForSickReason_ResultReturn]{success}[AutoSickReasonFile]{

C:\Program Files\VoiceGuide\Scripts\IntelliTime\Temp\1_SickReason.wav}[isSickReasonRequired]{True}[sickProcessMsgFile]{WAV Files\CallInSick_WaitProcess.wav}[PlayPrepareRecording_ResultReturn]{success}[Rec

ordSickReason]{C:\Program Files\VoiceGuide\Scripts\IntelliTime\Temp\1_SickReason.wav}[RecordSickReason_RecLen100ms]{82}[RecordSickReason_EndRec

Cause]{#}

173524.704 6 1 script will be ran from file: C:\Program Files\VoiceGuide\temp\vbs_1_13.vbs

Share this post


Link to post

The $RV[selectedSickStatusID] is not defined on this call. You can confirm this by just looking at the vgEngine trace. 

 

Yes, that is my problem because the script has passed the module to get this ID and finished confirmation from the user yet, it appears not to be defined.

(The script cannot even go to the vbscript module to process without this ID)

 

 

Recommend that in your VBScript you change:

RV_TargetAutoSickStatusID = $RV[selectedSickStatusID]

to:

RV_TargetAutoSickStatusID = "$RV[selectedSickStatusID]"

This was intentional to find out the cause of this error.

 

So based on your explanation, Voiceguide did not even get the ID value from "VPS..." script?

I can see from the log that the script ran through "VPS..." script to get the SickStautsID, but did not return the value...

 

Can you tell what has caused this error?

 

Thanks.

Share this post


Link to post

We can see in last call in the trace that the $RV[selectedSickStatusID] was set in module [VPS_ProcessResult].

The sequence of modules the script took during that good call was:

 

[ValidateSelectionRange]

[ConfirmCounter]

[ConfirmSelection01]

[ConfirmSelection02]

[ConfirmSelection03]

[VPS_ProcessResult]

[PrepareRecordingForSickReason]

[PlayPrepareRecording]

[RecordSickReason]

[ProcessAutoSick]

 

on the second last call in the trace (the problem call) we see this sequence of modules before the [ProcessAutoSick]:

 

[PlayValueGetSelection]

[GoBackToMainMenu]

[PrepareRecordingForSickReason]

[PlayPrepareRecording]

[RecordSickReason]

[ProcessAutoSick]

 

from [GoBackToMainMenu] there is a goto jump to [PrepareRecordingForSickReason]

 

173501.000 27 1 rem Script_Goto 1, CallInSick.vgs, PrepareRecordingForSickReason,

 

There is no call to [VPS_ProcessResult] module at any time earlier during that call either. The next previous jump to [VPS_ProcessResult] module can be seen in the trace some 3 hours earlier:

 

144939.488 6 1 state [VPS_ProcessResult] type: VB Script, iRunWait=1

 

So looks like your scripts just bypassed the [VPS_ProcessResult] module.

 

 

You should have a look at the way the call progresses though the script and ensure that the call will go through the modules you want the call to go through. You can also monitor which modules the script passes through on a call using the Status Monitor.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×