article by Frank Nimphius, July 2018
Oracle Intelligent Bots provides a DATE entity that bot designers can use to assign and save dates for later use. Though the DATE entity validates dates by their format, it does not check whether the provided date actually exists.
For example, February 29th only exists in leap years and February 30th does not exist at all. Assigning a date of February 30th is saved as March 2nd, which from a logical perspective appears to be the right thing to do, but from a business perspective may not be what you want.
In this article I explain how to create a custom bot component that validates date string entries based on a pre-defined date format and the validness of the actual date. If the date input string has passed validation you can then use the System.MatchEntity built-in component to save the date object in a context variable. Once saved in a context variable, using Apache FreeMarker expressions, you can print the date in any format you like. Sounds interesting? Well it is.
Figure 1: Valid Date
Figure 2: Invalid Date
Oracle Intelligent Bots has been rebranded Oracle Digital Assistant to better describe its capabilities beyond a standard chatbot. To learn more, visit cloud.oracle.com/digital-assistant
Read Full Article (PDF)