Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

VXML Studio 3.X Java Component

Dear All,

I need help on VXML Studio Custom Component development. I have developed a Decision component using Java API for VXML Studio 3.X, I have got it integrated successfully with VXML Studio (i.e. it can be seen in Elements pane of VXML Studio), but I am getting an error when it's called in call flow at VXML server, that error text is "stcDecisionKeyPress_01,element,error,pkgDecisionKeyPress.DecisionKeyPress is not a valid decision element class"

Following is the source code.

package pkgDecisionKeyPress;

import com.audium.server.AudiumException;

import com.audium.server.session.DecisionElementData;

import com.audium.server.voiceElement.ElementInterface;

import com.audium.server.voiceElement.DecisionElementBase;

import com.audium.server.voiceElement.ElementException;

import com.audium.server.voiceElement.ExitState;

import com.audium.server.voiceElement.Setting;

import com.audium.server.xml.DecisionElementConfig;

public class DecisionKeyPress extends DecisionElementBase implements ElementInterface{

public String doDecision(String name, DecisionElementData decisionData)

throws AudiumException

{

String strExitState = "";

DecisionElementConfig config = decisionData.getDecisionElementConfig();

String strResult = config.getSettingValue("InputValue", decisionData);

if(strResult=="0")

strExitState = "No";

else

if(strResult=="1")

strExitState = "Yes";

return strExitState;

}

public String getDescription() {

return "A Component To Make Dynamic Decisions";

}

public String getDisplayFolderName() {

return "myComponents";

}

public String getElementName() {

return "myDecisionKeyPress";

}

public Setting[] getSettings() throws ElementException {

Setting[] settings = new Setting[2];

settings[0] = new Setting(

"InputValue",

"InputValue",

"Creative Decisions",

Setting.REQUIRED,

Setting.SINGLE,

Setting.SUBSTITUTION_ALLOWED,

Setting.STRING);

settings[1] = new Setting(

"Value2Check",

"Value2Check",

"Creative Decisions",

Setting.REQUIRED,

Setting.SINGLE,

Setting.SUBSTITUTION_ALLOWED,

Setting.STRING);

return settings;

}

/* Since this is a custom configurable decision element (as opposed to an

* action element), this method must be defined to return the exit states

* this element has.

*/

public ExitState[] getExitStates() {

ExitState[] exitStates = new ExitState[2];

exitStates[0] = new ExitState("Yes", "Yes", "Yes");

exitStates[1] = new ExitState("No", "No", "No");

return exitStates;

}

}

Thanks & Regards,

M. Mudassir Saeed

199
Views
0
Helpful
0
Replies
CreatePlease to create content