Hi All,
In my custom voice class , I found VAction throws undefined for both nomatch and noinput, I check through cvp java doc 9.0, VAction class methods,
public static VAction getNew(VPreference preference, int type, String name, String value, boolean treat) throws VException
- This factory method is used to initialize a new
VAction
object with a variable declaration or assignment action. - Parameters:
preference
- AVPreference
object required to create a new VFC.type
- Can beVARIABLE
to declare a VoiceXML variable orASSIGN
to assign a value to an existing VoiceXML variable.name
- The name of the variable to declare or assign a value to.value
- The value, stored as aString
. Can benull
iftype
isVARIABLE
to declare a variable with no initial value. An undefined declaration can also be initialized by callingadd(int, String)
where the integer value isVARIABLE
.treat
- Can beWITH_QUOTES
to surrounded the value with single quotes orWITHOUT_QUOTES
to place the value directly in the VoiceXML.- when I use this method in my class I still found that it is undefined. Can't I get exact no input or nomatch instead of having undefined.
- and my code looks like
//NOMATCH Audio
NoMatchPrompt nomatch = new NoMatchPrompt(ved, nomatch_audio_group,"max_nomatch_count", getSubmitURL(), 1);
menufield.add(nomatch.getEvent());
//NOINPUT Audio
NoInputPrompt noinput = new NoInputPrompt(ved, noinput_audio_group,"max_noinput_count", getSubmitURL(), 1);
VEvent noinputEvent=noinput.getEvent();
noinputEvent.addProprietaryAttribute("return", "noinput");
menufield.add(noinputEvent);
//SUBMIT ACTION
VAction submitAction = VAction.getNew(pref, VAction.VARIABLE, "confidence", vFName+ "$.confidence", VAction.WITHOUT_QUOTES);
submitAction.add(getSubmitURL(), VXML_LOG_VARIABLE_NAME + " confidence");
// this action sets the menu field to undefined and throws a nomatch.
VAction throwNomatch = VAction.getNew(pref, VAction.ASSIGN, vFName, "noMatch", VAction.WITHOUT_QUOTES);
throwNomatch.add(VAction.THROW, VAction.NOMATCH);
// this action sets the menu field to undefined and throws a nomatch.
VAction throwNoinput = VAction.getNew(pref,VAction.ASSIGN, vFName, "noInput", VAction.WITHOUT_QUOTES);
throwNoinput.add(VAction.THROW, VAction.NOINPUT);
when I run this by debugger, I'm getting "undefined" for NINM. But I want separate value for NI and NM is this possible. thanks in advance..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could you show the code that is throwing the exact error, the NINM object?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.