VoiceGuide IVR Software Main Page
Jump to content

Module Returned Unexpected "fail" Result

Recommended Posts

Dear Support,

 

If you see the log attached,

One of my VB Script modules returns "Fail" resultLog_FailReturned.zip:

 

141940.667 6 2 1 path {fail} found (at offset 49)

 

This shows that the module [VPSH_GenerateListOfSelection] returned "fail", and I would like to know if it is "fail" because there is no record from the SQL procedure, or because there was some kind of an error while running the script. (I believe the SQL stored procedure used for this script returns records all right.)

 

If there is no record, the code below will run and it was supposed to set the wave path to the "NullSelectionPath", but as you can see from the log, the path remains "Wav Files\".

Else
  'No Selection List available for this selection. Return fail to IVR to play error.
  vg.Run_ResultReturn RV_LINEID, "fail"

  'Check the result variable and prepare Error message.
  'The error msg for null selection list will be passed from the parent script.
  strNullSelectionErrPath = "$RV[VPS_NullSelectionErrMsgPath]"

  If (strNullSelectionErrPath = "WAV Files\") Then
   'If no specific err msg, use default
    strNullSelectionErrPath = "WAV Files\Common_ErrNoSelection.wav"
  Else
    strNullSelectionErrPath = strNullSelectionErrPath
  End If

End If

Could you tell me what has caused this result, "fail"?

 

I am attaching the VGS script here as well just in case.

 

Thanks again for your help!

Share this post


Link to post

If there is no record, the code below will run and it was supposed to set the wave path to the "NullSelectionPath", but as you can see from the log, the path remains "Wav Files\".

 

If you look though the trace you see that $RV[VPS_NullSelectionErrMsgPath] is being set to "WAV Files\Common_ErrNoSelection.wav".

 

Its just that your script is calling Run_ResultReturn function twice. Once with 'fail' and second time with new $RVs

 

As soon as you call Run_ResultReturn VoiceGuide will continue on with the next module in VoiceGuide script. But your VBscript is written so that it continues to execute and the calls another Run_ResultReturn at a later time.

 

So on your system the module [ErrNoSelectionAvailable] is started before the second call to Run_ResultReturn sets the $RV[VPS_NullSelectionErrMsgPath]

 

Run_ResultReturn should only be called once per VBScript run. And its a good idea not to call any other API functions afterwards from that VBScript. Recommend that you redo your VBScripts to work along that guideline.

 

 

 

 

		Else
		'No Selection List available for this selection. Return fail to IVR to play error.
		vg.Run_ResultReturn RV_LINEID, "fail"

           'Check the result variable and prepare Error message.
           'The error msg for null selection list will be passed from the parent script.
           strNullSelectionErrPath = "$RV[VPS_NullSelectionErrMsgPath]"

           If (strNullSelectionErrPath = "WAV Files\") Then
           	'If no specific err msg, use default
           	strNullSelectionErrPath = "WAV Files\Common_ErrNoSelection.wav"
           Else
           	strNullSelectionErrPath = strNullSelectionErrPath
           End If

	End If
	.Close
End With

'Trim file path to return the name as following:
'Current: "temp\2_SelectionTTS_3.txt"
'After Change: "temp\2_SelectionTTS_" to be used in the iterating GetNumber Module (Simply add counter and ".txt")
'The remaining part of the file path will be acquired at the target module at runtime.
If strFilePath <> "" Then
	strFilePath = Left(strFilePath,InStrRev(strFilePath,"_"))
End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''' Return variables for menu file and listIDs
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

vg.Run_ResultReturn RV_LINEID, "[VPS_IDList]{" & strIDList & "}[VPS_PromptList]{" & _
	strPromptPathList & "}[VPS_SelectionTotal]{" & intSelectionTotal & "}[VPS_Counter]{1}[VPS_NullSelectionErrMsgPath]{" & strNullSelectionErrPath & "}"

 

 

 

141940.667 10 2 1 rem Run_ResultReturn é [fail] [fail] 4 4

141940.667 10 2 1 qScr add cmdRun_ResultReturn 0

141940.667 6 2 1 qScr run cmdRun_ResultReturn sCode=[] iActionID=0, crn=0[0|0|0|0|0][fail|||||]

141940.667 6 2 1 rv add [VPSH_GenerateListOfSelection_ResultReturn]{fail}

141940.667 6 d added VPSH_GenerateListOfSelection_ResultReturn | fail | ( 56 50 53 48 5f 47 65 6e 65 72 61 74 65 4c 69 73 74 4f 66 53 65 6c 65 63 74 69 6f 6e 5f 52 65 73 75 6c 74 52 65 74 75 72 6e | 66 61 69 6c | 42)

141940.667 6 d added VPSH_GenerateListOfSelection_ResultReturn | fail | ( 56 50 53 48 5f 47 65 6e 65 72 61 74 65 4c 69 73 74 4f 66 53 65 6c 65 63 74 69 6f 6e 5f 52 65 73 75 6c 74 52 65 74 75 72 6e | 66 61 69 6c | 113)

141940.667 6 2 1 path {fail} found (at offset 49)

141940.667 6 2 1 FindNextVgmTitleInPathList: next module title is=[ErrNoSelectionAvailable]

141940.667 6 2 1 module's runwait=1, WavPlayHasNowFinished=0, iRunWait_ExeResult_NextVgm=222

141940.667 6 2 1 t timer clear (force=False)

141940.667 6 2 1 RunModule start Play, [ErrNoSelectionAvailable], iModuleIdx=222, previous: vgm=213, vgs=10

141940.667 6 2 1 [ErrNoSelectionAvailable] VGMTYPE_PLAY run start

141940.667 6 2 1 CheckForAnyPlayActionsAndSetkeysIfNecessary no PlayActions, vgmidx=222, strPaths=on {timeout 0} goto [Login.vgs|GetMainMenu]

 

141940.667 6 2 1 PrepareAndPlayWavAndTts start iModuleIdx=222, iPlayFileIdx=1, bMakeTtsFile=True, sSoundFileIs=

141940.667 6 2 1 rv replace start [$RV[VPS_NullSelectionErrMsgPath]]

141940.667 6 2 1 rv replace end [WAV Files\]

141940.667 6 2 1 PrepareAndPlayWavAndTTS sPlayFile=WAV Files\

141940.667 6 2 1 state [ErrNoSelectionAvailable] Playing wav (WAV Files\)

141940.667 6 2 1 input [WAV Files\] does not contain .wav or .vox - assume DTMF is to be played. pass to ktTel as is.

141940.667 6 2 1 t timer clear (force=False)

141940.667 6 2 1 qTel add cmd_PlayStart [0,0,0,0,0][||||]

141940.667 6 2 1 play start ok, playId=180375

141940.667 7 2 1 qTel run cmd_PlayStart

141940.667 10 2 1 rem Run_ResultReturn é [[VPS_IDList]{}[VPS_PromptList]{}[VPS_SelectionTotal]{}[VPS_Counter]{1}[VPS_NullSelectionErrMsgPath]{WAV Files\Common_ErrNoSelection.wav}] [[VPS_IDList]{}[VPS_PromptList]{}[VPS_SelectionTotal]{}[VPS_Counter]{1}[VPS_NullSelectionErrMsgPath]{WAV Files\Common_ErrNoSelection.wav}] 136 136

 

 

 

 

NB. Strictly speaking this is debugging a VBScript, not a VoiceGuide script.

The general approach to VBScripts is to insert multiple Admin_TraceLogAdd calls to the VBScript that you need to debug and then you will be able to trace the VBscript execution in the vgEngine trace file.

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
×