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

CVP Element set exit state

david_legrand
Level 4
Level 4

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

1 Reply 1

Quigath
Spotlight
Spotlight

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
};