cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
323
Views
0
Helpful
1
Replies
Highlighted
Enthusiast

CVP Element set exit state

Hello,

 

I am creating a custom element in CVP studio. It is working fine. I have created several exit states, but I wonder how to set one of this exit. It is by default going to "done" exit, what method can I use to set a specific one.

 

//My exit state declaration

ExitState Failed = new ExitState("Failed", "Failed", "Authentication failure");
ExitState Success = new ExitState("Success", "Success", "Authentication success");
ExitState error = new ExitState("error", "error", "Error");
ExitState done = new ExitState("done", "done", "done");

//

 

Is there a method like ActionData.SetExitState ?

 

Thanks In advance

 

David

Everyone's tags (3)
1 REPLY 1
Enthusiast

Re: CVP Element set exit state

Nope, it's as simple as returning the exit state String from your main entry method.

 

I have a class the implements ElementInterface and I have a addXmlBody(VMain, Hashtable, VoiceElementData) method. From that I simply return the state that I want:

return getExitState().name();

 

Where my exit states are in an enum:

public enum ExitStates {
done, error, no_match, too_many_orders, too_many_tracking_numbers, no_orders
};

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards