06-17-2016 01:43 PM
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
VAction
object with a variable declaration or assignment action.preference
- A VPreference
object required to create a new VFC.type
- Can be VARIABLE
to declare a VoiceXML variable or ASSIGN
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 a String
. Can be null
if type
is VARIABLE
to declare a variable with no initial value. An undefined declaration can also be initialized by calling add(int, String)
where the integer value is VARIABLE
.treat
- Can be WITH_QUOTES
to surrounded the value with single quotes or WITHOUT_QUOTES
to place the value directly in the VoiceXML.//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..
06-22-2016 10:22 AM
Could you show the code that is throwing the exact error, the NINM object?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide