cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
446
Views
0
Helpful
1
Replies

VAction throws undefined for NINM

sreekanth47
Level 4
Level 4

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 - 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.
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..

1 Reply 1

ewindgat
Level 5
Level 5

Could you show the code that is throwing the exact error, the NINM object?