cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
556
Views
0
Helpful
3
Replies

CVP throw me the error after second try on custom datewithconfirm element.

vincent.zheng
Enthusiast
Enthusiast

In the attached file is the custom java class I created. When I debug my code, I got following prompt:

Connecting...

Prompt: enter date

Input: 19900231

Recognition: '19900231'

Prompt: enter date

Input: 1990020

Recognition: '<nomatch>'

Prompt: no match

Input: 19900231

Recognition: '19900231'

Prompt: Sorry. There has been an error. (/CVP/audio/error.wav)

Disconnected.

As you can see 19900231 is an invalid date, so it should give me something like Recognition:'<nomatch>', And furthermore, if I try to enter the same invalid date again, it throw me back the error. How can I fix this issue?

The version of Call Studio we are using is 10.5

3 Replies 3

Amit Agni
Cisco Employee
Cisco Employee

Till the time will take a insight to the attached code, on why an an invalid date "19900231" is recognized and subsequent tries playing an error wav.

Can you please try deploying the application and check the behavior.

This way it will help us understand more and whether some issue with Call Studio Debugger.

It can't be tested without the DateUtils.

In your DateUtils - when it creates SimpleDateFormat sdf, perhaps you

forgot to include sdf.setLenient(false)?

It's impossible to know without seeing your DateUtils.

I modified your code - removing the unknown DateUtils, and adding my own

SimpleDateFormat, with setLenient(false) and catching the sdf.parse

exception, and it caught "19900231" as a bad date.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: