12-07-2016 01:48 PM
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
12-18-2016 03:15 AM
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.
12-18-2016 05:30 AM
It can't be tested without the DateUtils.
12-18-2016 06:00 AM
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.
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: