diff --git a/samples/13.core-bot/LICENSE b/samples/13.core-bot/LICENSE
new file mode 100644
index 000000000..21071075c
--- /dev/null
+++ b/samples/13.core-bot/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/samples/13.core-bot/README-LUIS.md b/samples/13.core-bot/README-LUIS.md
new file mode 100644
index 000000000..12bc78ed0
--- /dev/null
+++ b/samples/13.core-bot/README-LUIS.md
@@ -0,0 +1,216 @@
+# Setting up LUIS via CLI:
+
+This README contains information on how to create and deploy a LUIS application. When the bot is ready to be deployed to production, we recommend creating a LUIS Endpoint Resource for usage with your LUIS App.
+
+> _For instructions on how to create a LUIS Application via the LUIS portal, see these Quickstart steps:_
+> 1. _[Quickstart: Create a new app in the LUIS portal][Quickstart-create]_
+> 2. _[Quickstart: Deploy an app in the LUIS portal][Quickstart-deploy]_
+
+ [Quickstart-create]: https://docs.microsoft.com/azure/cognitive-services/luis/get-started-portal-build-app
+ [Quickstart-deploy]:https://docs.microsoft.com/azure/cognitive-services/luis/get-started-portal-deploy-app
+
+## Table of Contents:
+
+- [Prerequisites](#Prerequisites)
+- [Import a new LUIS Application using a local LUIS application](#Import-a-new-LUIS-Application-using-a-local-LUIS-application)
+- [How to create a LUIS Endpoint resource in Azure and pair it with a LUIS Application](#How-to-create-a-LUIS-Endpoint-resource-in-Azure-and-pair-it-with-a-LUIS-Application)
+
+___
+
+## [Prerequisites](#Table-of-Contents):
+
+#### Install Azure CLI >=2.0.61:
+
+Visit the following page to find the correct installer for your OS:
+- https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
+
+#### Install LUIS CLI >=2.4.0:
+
+Open a CLI of your choice and type the following:
+
+```bash
+npm i -g luis-apis@^2.4.0
+```
+
+#### LUIS portal account:
+
+You should already have a LUIS account with either https://luis.ai, https://eu.luis.ai, or https://au.luis.ai. To determine where to create a LUIS account, consider where you will deploy your LUIS applications, and then place them in [the corresponding region][LUIS-Authoring-Regions].
+
+After you've created your account, you need your [Authoring Key][LUIS-AKey] and a LUIS application ID.
+
+ [LUIS-Authoring-Regions]: https://docs.microsoft.com/azure/cognitive-services/luis/luis-reference-regions#luis-authoring-regions]
+ [LUIS-AKey]: https://docs.microsoft.com/azure/cognitive-services/luis/luis-concept-keys#authoring-key
+
+___
+
+## [Import a new LUIS Application using a local LUIS application](#Table-of-Contents)
+
+### 1. Import the local LUIS application to luis.ai
+
+```bash
+luis import application --region "LuisAppAuthoringRegion" --authoringKey "LuisAuthoringKey" --appName "FlightBooking" --in "./cognitiveModels/FlightBooking.json"
+```
+
+Outputs the following JSON:
+
+```json
+{
+ "id": "########-####-####-####-############",
+ "name": "FlightBooking",
+ "description": "A LUIS model that uses intent and entities.",
+ "culture": "en-us",
+ "usageScenario": "",
+ "domain": "",
+ "versionsCount": 1,
+ "createdDateTime": "2019-03-29T18:32:02Z",
+ "endpoints": {},
+ "endpointHitsCount": 0,
+ "activeVersion": "0.1",
+ "ownerEmail": "bot@contoso.com",
+ "tokenizerVersion": "1.0.0"
+}
+```
+
+For the next step, you'll need the `"id"` value for `--appId` and the `"activeVersion"` value for `--versionId`.
+
+### 2. Train the LUIS Application
+
+```bash
+luis train version --region "LuisAppAuthoringRegion" --authoringKey "LuisAuthoringKey" --appId "LuisAppId" --versionId "LuisAppversion" --wait
+```
+
+### 3. Publish the LUIS Application
+
+```bash
+luis publish version --region "LuisAppAuthoringRegion" --authoringKey "LuisAuthoringKey" --appId "LuisAppId" --versionId "LuisAppversion" --publishRegion "LuisAppPublishRegion"
+```
+
+> `--region` corresponds to the region you _author_ your application in. The regions available for this are "westus", "westeurope" and "australiaeast".
+> These regions correspond to the three available portals, https://luis.ai, https://eu.luis.ai, or https://au.luis.ai.
+> `--publishRegion` corresponds to the region of the endpoint you're publishing to, (e.g. "westus", "southeastasia", "westeurope", "brazilsouth").
+> See the [reference docs][Endpoint-API] for a list of available publish/endpoint regions.
+
+ [Endpoint-API]: https://westus.dev.cognitive.microsoft.com/docs/services/5819c76f40a6350ce09de1ac/operations/5819c77140a63516d81aee78
+
+Outputs the following:
+
+```json
+ {
+ "versionId": "0.1",
+ "isStaging": false,
+ "endpointUrl": "https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/########-####-####-####-############",
+ "region": "westus",
+ "assignedEndpointKey": null,
+ "endpointRegion": "westus",
+ "failedRegions": "",
+ "publishedDateTime": "2019-03-29T18:40:32Z",
+ "directVersionPublish": false
+}
+```
+
+To see how to create an LUIS Cognitive Service Resource in Azure, please see [the next README][README-LUIS]. This Resource should be used when you want to move your bot to production. The instructions will show you how to create and pair the resource with a LUIS Application.
+
+ [README-LUIS]: ./README-LUIS.md
+
+___
+
+## [How to create a LUIS Endpoint resource in Azure and pair it with a LUIS Application](#Table-of-Contents)
+
+### 1. Create a new LUIS Cognitive Services resource on Azure via Azure CLI
+
+> _Note:_
+> _If you don't have a Resource Group in your Azure subscription, you can create one through the Azure portal or through using:_
+> ```bash
+> az group create --subscription "AzureSubscriptionGuid" --location "westus" --name "ResourceGroupName"
+> ```
+> _To see a list of valid locations, use `az account list-locations`_
+
+
+```bash
+# Use Azure CLI to create the LUIS Key resource on Azure
+az cognitiveservices account create --kind "luis" --name "NewLuisResourceName" --sku "S0" --location "westus" --subscription "AzureSubscriptionGuid" -g "ResourceGroupName"
+```
+
+The command will output a response similar to the JSON below:
+
+```json
+{
+ "endpoint": "https://westus.api.cognitive.microsoft.com/luis/v2.0",
+ "etag": "\"########-####-####-####-############\"",
+ "id": "/subscriptions/########-####-####-####-############/resourceGroups/ResourceGroupName/providers/Microsoft.CognitiveServices/accounts/NewLuisResourceName",
+ "internalId": "################################",
+ "kind": "luis",
+ "location": "westus",
+ "name": "NewLuisResourceName",
+ "provisioningState": "Succeeded",
+ "resourceGroup": "ResourceGroupName",
+ "sku": {
+ "name": "S0",
+ "tier": null
+ },
+ "tags": null,
+ "type": "Microsoft.CognitiveServices/accounts"
+}
+```
+
+
+
+Take the output from the previous command and create a JSON file in the following format:
+
+```json
+{
+ "azureSubscriptionId": "00000000-0000-0000-0000-000000000000",
+ "resourceGroup": "ResourceGroupName",
+ "accountName": "NewLuisResourceName"
+}
+```
+
+### 2. Retrieve ARM access token via Azure CLI
+
+```bash
+az account get-access-token --subscription "AzureSubscriptionGuid"
+```
+
+This will return an object that looks like this:
+
+```json
+{
+ "accessToken": "eyJ0eXAiOiJKVtokentokentokentokentokeng1dCI6Ik4tbEMwbi05REFMcXdodUhZbkhRNjNHZUNYYyIsItokenI6Ik4tbEMwbi05REFMcXdodUhZbkhRNjNHZUNYYyJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC83MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDcvIiwiaWF0IjoxNTUzODc3MTUwLCJuYmYiOjE1NTM4NzcxNTAsImV4cCI6MTU1Mzg4MTA1MCwiX2NsYWltX25hbWVzIjp7Imdyb3VwcyI6InNyYzEifSwiX2NsYWltX3NvdXJjZXMiOnsic3JjMSI6eyJlbmRwb2ludCI6Imh0dHBzOi8vZ3JhcGgud2luZG93cy5uZXQvNzJmOTg4YmYtODZmMS00MWFmLTkxYWItMmQ3Y2QwMTFkYjQ3L3VzZXJzL2ZmZTQyM2RkLWJhM2YtNDg0Ny04NjgyLWExNTI5MDA4MjM4Ny9nZXRNZW1iZXJPYmplY3RzIn19LCJhY3IiOiIxIiwiYWlvIjoiQVZRQXEvOEtBQUFBeGVUc201NDlhVHg4RE1mMFlRVnhGZmxxOE9RSC9PODR3QktuSmRqV1FqTkkwbmxLYzB0bHJEZzMyMFZ5bWZGaVVBSFBvNUFFUTNHL0FZNDRjdk01T3M0SEt0OVJkcE5JZW9WU0dzd0kvSkk9IiwiYW1yIjpbIndpYSIsIm1mYSJdLCJhcHBpZCI6IjA0YjA3Nzk1LThkZGItNDYxYS1iYmVlLTAyZjllMWJmN2I0NiIsImFwcGlkYWNyIjoiMCIsImRldmljZWlkIjoiNDhmNDVjNjEtMTg3Zi00MjUxLTlmZWItMTllZGFkZmMwMmE3IiwiZmFtaWx5X25hbWUiOiJHdW0iLCJnaXZlbl9uYW1lIjoiU3RldmVuIiwiaXBhZGRyIjoiMTY3LjIyMC4yLjU1IiwibmFtZSI6IlN0ZXZlbiBHdW0iLCJvaWQiOiJmZmU0MjNkZC1iYTNmLTQ4NDctODY4Mi1hMTUyOTAwODIzODciLCJvbnByZW1fc2lkIjoiUy0xLTUtMjEtMjEyNzUyMTE4NC0xNjA0MDEyOTIwLTE4ODc5Mjc1MjctMjYwOTgyODUiLCJwdWlkIjoiMTAwMzdGRkVBMDQ4NjlBNyIsInJoIjoiSSIsInNjcCI6InVzZXJfaW1wZXJzb25hdGlvbiIsInN1YiI6Ik1rMGRNMWszN0U5ckJyMjhieUhZYjZLSU85LXVFQVVkZFVhNWpkSUd1Nk0iLCJ0aWQiOiI3MmY5ODhiZi04NmYxLTQxYWYtOTFhYi0yZDdjZDAxMWRiNDciLCJ1bmlxdWVfbmFtZSI6InN0Z3VtQG1pY3Jvc29mdC5jb20iLCJ1cG4iOiJzdGd1bUBtaWNyb3NvZnQuY29tIiwidXRpIjoiT2w2NGN0TXY4RVNEQzZZQWRqRUFtokenInZlciI6IjEuMCJ9.kFAsEilE0mlS1pcpqxf4rEnRKeYsehyk-gz-zJHUrE__oad3QjgDSBDPrR_ikLdweynxbj86pgG4QFaHURNCeE6SzrbaIrNKw-n9jrEtokenlosOxg_0l2g1LeEUOi5Q4gQREAU_zvSbl-RY6sAadpOgNHtGvz3Rc6FZRITfkckSLmsKAOFoh-aWC6tFKG8P52rtB0qVVRz9tovBeNqkMYL49s9ypduygbXNVwSQhm5JszeWDgrFuVFHBUP_iENCQYGQpEZf_KvjmX1Ur1F9Eh9nb4yI2gFlKncKNsQl-tokenK7-tokentokentokentokentokentokenatoken",
+ "expiresOn": "2200-12-31 23:59:59.999999",
+ "subscription": "AzureSubscriptionGuid",
+ "tenant": "tenant-guid",
+ "tokenType": "Bearer"
+}
+```
+
+The value needed for the next step is the `"accessToken"`.
+
+### 3. Use `luis add appazureaccount` to pair your LUIS resource with a LUIS Application
+
+```bash
+luis add appazureaccount --in "path/to/created/requestBody.json" --appId "LuisAppId" --authoringKey "LuisAuthoringKey" --armToken "accessToken"
+```
+
+If successful, it should yield a response like this:
+
+```json
+{
+ "code": "Success",
+ "message": "Operation Successful"
+}
+```
+
+### 4. See the LUIS Cognitive Services' keys
+
+```bash
+az cognitiveservices account keys list --name "NewLuisResourceName" --subscription "AzureSubscriptionGuid" -g "ResourceGroupName"
+```
+
+This will return an object that looks like this:
+
+```json
+{
+ "key1": "9a69####dc8f####8eb4####399f####",
+ "key2": "####f99e####4b1a####fb3b####6b9f"
+}
+```
diff --git a/samples/13.core-bot/README.md b/samples/13.core-bot/README.md
new file mode 100644
index 000000000..5eb579ae9
--- /dev/null
+++ b/samples/13.core-bot/README.md
@@ -0,0 +1,67 @@
+# CoreBot
+
+Bot Framework v4 core bot sample.
+
+This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to:
+
+- Use [LUIS](https://www.luis.ai) to implement core AI capabilities
+- Implement a multi-turn conversation using Dialogs
+- Handle user interruptions for such things as `Help` or `Cancel`
+- Prompt for and validate requests for information from the user
+
+## Prerequisites
+
+This sample **requires** prerequisites in order to run.
+
+### Overview
+
+This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding.
+
+### Create a LUIS Application to enable language understanding
+
+The LUIS model for this example can be found under `cognitiveModels/FlightBooking.json` and the LUIS language model setup, training, and application configuration steps can be found [here](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-luis?view=azure-bot-service-4.0&tabs=cs).
+
+Once you created the LUIS model, update `application.properties` with your `LuisAppId`, `LuisAPIKey` and `LuisAPIHostName`.
+
+```
+ LuisAppId="Your LUIS App Id"
+ LuisAPIKey="Your LUIS Subscription key here"
+ LuisAPIHostName="Your LUIS App region here (i.e: westus.api.cognitive.microsoft.com)"
+```
+
+## To try this sample
+
+- From the root of this project folder:
+ - Build the sample using `mvn package`
+ - Run it by using `java -jar .\target\bot-core-sample.jar`
+
+## Testing the bot using Bot Framework Emulator
+
+[Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.
+
+- Install the latest Bot Framework Emulator from [here](https://github.com/Microsoft/BotFramework-Emulator/releases)
+
+### Connect to the bot using Bot Framework Emulator
+
+- Launch Bot Framework Emulator
+- File -> Open Bot
+- Enter a Bot URL of `http://localhost:3978/api/messages`
+
+## Deploy the bot to Azure
+
+To learn more about deploying a bot to Azure, see [Deploy your bot to Azure](https://aka.ms/azuredeployment) for a complete list of deployment instructions.
+
+## Further reading
+
+- [Bot Framework Documentation](https://docs.botframework.com)
+- [Bot Basics](https://docs.microsoft.com/azure/bot-service/bot-builder-basics?view=azure-bot-service-4.0)
+- [Dialogs](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-dialog?view=azure-bot-service-4.0)
+- [Gathering Input Using Prompts](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-prompts?view=azure-bot-service-4.0&tabs=csharp)
+- [Activity processing](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-activity-processing?view=azure-bot-service-4.0)
+- [Azure Bot Service Introduction](https://docs.microsoft.com/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
+- [Azure Bot Service Documentation](https://docs.microsoft.com/azure/bot-service/?view=azure-bot-service-4.0)
+- [Azure CLI](https://docs.microsoft.com/cli/azure/?view=azure-cli-latest)
+- [Azure Portal](https://portal.azure.com)
+- [Language Understanding using LUIS](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/)
+- [Channels and Bot Connector Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-concepts?view=azure-bot-service-4.0)
+- [Spring Boot](https://spring.io/projects/spring-boot)
diff --git a/samples/13.core-bot/cognitiveModels/FlightBooking.json b/samples/13.core-bot/cognitiveModels/FlightBooking.json
new file mode 100644
index 000000000..89aad31ae
--- /dev/null
+++ b/samples/13.core-bot/cognitiveModels/FlightBooking.json
@@ -0,0 +1,339 @@
+{
+ "luis_schema_version": "3.2.0",
+ "versionId": "0.1",
+ "name": "FlightBooking",
+ "desc": "Luis Model for CoreBot",
+ "culture": "en-us",
+ "tokenizerVersion": "1.0.0",
+ "intents": [
+ {
+ "name": "BookFlight"
+ },
+ {
+ "name": "Cancel"
+ },
+ {
+ "name": "GetWeather"
+ },
+ {
+ "name": "None"
+ }
+ ],
+ "entities": [],
+ "composites": [
+ {
+ "name": "From",
+ "children": [
+ "Airport"
+ ],
+ "roles": []
+ },
+ {
+ "name": "To",
+ "children": [
+ "Airport"
+ ],
+ "roles": []
+ }
+ ],
+ "closedLists": [
+ {
+ "name": "Airport",
+ "subLists": [
+ {
+ "canonicalForm": "Paris",
+ "list": [
+ "paris",
+ "cdg"
+ ]
+ },
+ {
+ "canonicalForm": "London",
+ "list": [
+ "london",
+ "lhr"
+ ]
+ },
+ {
+ "canonicalForm": "Berlin",
+ "list": [
+ "berlin",
+ "txl"
+ ]
+ },
+ {
+ "canonicalForm": "New York",
+ "list": [
+ "new york",
+ "jfk"
+ ]
+ },
+ {
+ "canonicalForm": "Seattle",
+ "list": [
+ "seattle",
+ "sea"
+ ]
+ }
+ ],
+ "roles": []
+ }
+ ],
+ "patternAnyEntities": [],
+ "regex_entities": [],
+ "prebuiltEntities": [
+ {
+ "name": "datetimeV2",
+ "roles": []
+ }
+ ],
+ "model_features": [],
+ "regex_features": [],
+ "patterns": [],
+ "utterances": [
+ {
+ "text": "book a flight",
+ "intent": "BookFlight",
+ "entities": []
+ },
+ {
+ "text": "book a flight from new york",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 19,
+ "endPos": 26
+ }
+ ]
+ },
+ {
+ "text": "book a flight from seattle",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 19,
+ "endPos": 25
+ }
+ ]
+ },
+ {
+ "text": "book a hotel in new york",
+ "intent": "None",
+ "entities": []
+ },
+ {
+ "text": "book a restaurant",
+ "intent": "None",
+ "entities": []
+ },
+ {
+ "text": "book flight from london to paris on feb 14th",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 17,
+ "endPos": 22
+ },
+ {
+ "entity": "To",
+ "startPos": 27,
+ "endPos": 31
+ }
+ ]
+ },
+ {
+ "text": "book flight to berlin on feb 14th",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "To",
+ "startPos": 15,
+ "endPos": 20
+ }
+ ]
+ },
+ {
+ "text": "book me a flight from london to paris",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 22,
+ "endPos": 27
+ },
+ {
+ "entity": "To",
+ "startPos": 32,
+ "endPos": 36
+ }
+ ]
+ },
+ {
+ "text": "bye",
+ "intent": "Cancel",
+ "entities": []
+ },
+ {
+ "text": "cancel booking",
+ "intent": "Cancel",
+ "entities": []
+ },
+ {
+ "text": "exit",
+ "intent": "Cancel",
+ "entities": []
+ },
+ {
+ "text": "find an airport near me",
+ "intent": "None",
+ "entities": []
+ },
+ {
+ "text": "flight to paris",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "To",
+ "startPos": 10,
+ "endPos": 14
+ }
+ ]
+ },
+ {
+ "text": "flight to paris from london on feb 14th",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "To",
+ "startPos": 10,
+ "endPos": 14
+ },
+ {
+ "entity": "From",
+ "startPos": 21,
+ "endPos": 26
+ }
+ ]
+ },
+ {
+ "text": "fly from berlin to paris on may 5th",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 9,
+ "endPos": 14
+ },
+ {
+ "entity": "To",
+ "startPos": 19,
+ "endPos": 23
+ }
+ ]
+ },
+ {
+ "text": "go to paris",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "To",
+ "startPos": 6,
+ "endPos": 10
+ }
+ ]
+ },
+ {
+ "text": "going from paris to berlin",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 11,
+ "endPos": 15
+ },
+ {
+ "entity": "To",
+ "startPos": 20,
+ "endPos": 25
+ }
+ ]
+ },
+ {
+ "text": "i'd like to rent a car",
+ "intent": "None",
+ "entities": []
+ },
+ {
+ "text": "ignore",
+ "intent": "Cancel",
+ "entities": []
+ },
+ {
+ "text": "travel from new york to paris",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "From",
+ "startPos": 12,
+ "endPos": 19
+ },
+ {
+ "entity": "To",
+ "startPos": 24,
+ "endPos": 28
+ }
+ ]
+ },
+ {
+ "text": "travel to new york",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "To",
+ "startPos": 10,
+ "endPos": 17
+ }
+ ]
+ },
+ {
+ "text": "travel to paris",
+ "intent": "BookFlight",
+ "entities": [
+ {
+ "entity": "To",
+ "startPos": 10,
+ "endPos": 14
+ }
+ ]
+ },
+ {
+ "text": "what's the forecast for this friday?",
+ "intent": "GetWeather",
+ "entities": []
+ },
+ {
+ "text": "what's the weather like for tomorrow",
+ "intent": "GetWeather",
+ "entities": []
+ },
+ {
+ "text": "what's the weather like in new york",
+ "intent": "GetWeather",
+ "entities": []
+ },
+ {
+ "text": "what's the weather like?",
+ "intent": "GetWeather",
+ "entities": []
+ },
+ {
+ "text": "winter is coming",
+ "intent": "None",
+ "entities": []
+ }
+ ],
+ "settings": []
+}
diff --git a/samples/13.core-bot/deploymentTemplates/template-with-new-rg.json b/samples/13.core-bot/deploymentTemplates/template-with-new-rg.json
new file mode 100644
index 000000000..ec2460d3a
--- /dev/null
+++ b/samples/13.core-bot/deploymentTemplates/template-with-new-rg.json
@@ -0,0 +1,291 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "groupLocation": {
+ "defaultValue": "",
+ "type": "string",
+ "metadata": {
+ "description": "Specifies the location of the Resource Group."
+ }
+ },
+ "groupName": {
+ "type": "string",
+ "metadata": {
+ "description": "Specifies the name of the Resource Group."
+ }
+ },
+ "appId": {
+ "type": "string",
+ "metadata": {
+ "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings."
+ }
+ },
+ "appSecret": {
+ "type": "string",
+ "metadata": {
+ "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings."
+ }
+ },
+ "botId": {
+ "type": "string",
+ "metadata": {
+ "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable."
+ }
+ },
+ "botSku": {
+ "defaultValue": "S1",
+ "type": "string",
+ "metadata": {
+ "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1."
+ }
+ },
+ "newAppServicePlanName": {
+ "defaultValue": "",
+ "type": "string",
+ "metadata": {
+ "description": "The name of the App Service Plan."
+ }
+ },
+ "newAppServicePlanSku": {
+ "type": "object",
+ "defaultValue": {
+ "name": "P1v2",
+ "tier": "PremiumV2",
+ "size": "P1v2",
+ "family": "Pv2",
+ "capacity": 1
+ },
+ "metadata": {
+ "description": "The SKU of the App Service Plan. Defaults to Standard values."
+ }
+ },
+ "newAppServicePlanLocation": {
+ "defaultValue": "",
+ "type": "string",
+ "metadata": {
+ "description": "The location of the App Service Plan. Defaults to \"westus\"."
+ }
+ },
+ "newWebAppName": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"."
+ }
+ }
+ },
+ "variables": {
+ "appServicePlanName": "[parameters('newAppServicePlanName')]",
+ "resourcesLocation": "[parameters('newAppServicePlanLocation')]",
+ "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]",
+ "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]",
+ "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]",
+ "publishingUsername": "[concat('$', parameters('newWebAppName'))]",
+ "resourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('groupName'))]"
+ },
+ "resources": [
+ {
+ "name": "[parameters('groupName')]",
+ "type": "Microsoft.Resources/resourceGroups",
+ "apiVersion": "2018-05-01",
+ "location": "[parameters('groupLocation')]",
+ "properties": {}
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "apiVersion": "2018-05-01",
+ "name": "storageDeployment",
+ "resourceGroup": "[parameters('groupName')]",
+ "dependsOn": [
+ "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {},
+ "variables": {},
+ "resources": [
+ {
+ "comments": "Create a new Linux App Service Plan if no existing App Service Plan name was passed in.",
+ "type": "Microsoft.Web/serverfarms",
+ "name": "[variables('appServicePlanName')]",
+ "apiVersion": "2018-02-01",
+ "location": "[variables('resourcesLocation')]",
+ "sku": "[parameters('newAppServicePlanSku')]",
+ "kind": "linux",
+ "properties": {
+ "perSiteScaling": false,
+ "maximumElasticWorkerCount": 1,
+ "isSpot": false,
+ "reserved": true,
+ "isXenon": false,
+ "hyperV": false,
+ "targetWorkerCount": 0,
+ "targetWorkerSizeId": 0
+ }
+ },
+ {
+ "comments": "Create a Web App using a Linux App Service Plan",
+ "type": "Microsoft.Web/sites",
+ "apiVersion": "2018-11-01",
+ "location": "[variables('resourcesLocation')]",
+ "kind": "app,linux",
+ "dependsOn": [
+ "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]"
+ ],
+ "name": "[variables('webAppName')]",
+ "properties": {
+ "name": "[variables('webAppName')]",
+ "hostNameSslStates": [
+ {
+ "name": "[concat(parameters('newWebAppName'), '.azurewebsites.net')]",
+ "sslState": "Disabled",
+ "hostType": "Standard"
+ },
+ {
+ "name": "[concat(parameters('newWebAppName'), '.scm.azurewebsites.net')]",
+ "sslState": "Disabled",
+ "hostType": "Repository"
+ }
+ ],
+ "serverFarmId": "[variables('appServicePlanName')]",
+ "reserved": true,
+ "isXenon": false,
+ "hyperV": false,
+ "scmSiteAlsoStopped": false,
+ "clientAffinityEnabled": true,
+ "clientCertEnabled": false,
+ "hostNamesDisabled": false,
+ "containerSize": 0,
+ "dailyMemoryTimeQuota": 0,
+ "httpsOnly": false,
+ "redundancyMode": "None",
+ "siteConfig": {
+ "appSettings": [
+ {
+ "name": "JAVA_OPTS",
+ "value": "-Dserver.port=80"
+ },
+ {
+ "name": "MicrosoftAppId",
+ "value": "[parameters('appId')]"
+ },
+ {
+ "name": "MicrosoftAppPassword",
+ "value": "[parameters('appSecret')]"
+ }
+ ],
+ "cors": {
+ "allowedOrigins": [
+ "https://botservice.hosting.portal.azure.net",
+ "https://hosting.onecloud.azure-test.net/"
+ ]
+ }
+ }
+ }
+ },
+ {
+ "type": "Microsoft.Web/sites/config",
+ "apiVersion": "2018-11-01",
+ "name": "[concat(variables('webAppName'), '/web')]",
+ "location": "[variables('resourcesLocation')]",
+ "dependsOn": [
+ "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]"
+ ],
+ "properties": {
+ "numberOfWorkers": 1,
+ "defaultDocuments": [
+ "Default.htm",
+ "Default.html",
+ "Default.asp",
+ "index.htm",
+ "index.html",
+ "iisstart.htm",
+ "default.aspx",
+ "index.php",
+ "hostingstart.html"
+ ],
+ "netFrameworkVersion": "v4.0",
+ "linuxFxVersion": "JAVA|8-jre8",
+ "requestTracingEnabled": false,
+ "remoteDebuggingEnabled": false,
+ "httpLoggingEnabled": false,
+ "logsDirectorySizeLimit": 35,
+ "detailedErrorLoggingEnabled": false,
+ "publishingUsername": "[variables('publishingUsername')]",
+ "scmType": "None",
+ "use32BitWorkerProcess": true,
+ "webSocketsEnabled": false,
+ "alwaysOn": true,
+ "managedPipelineMode": "Integrated",
+ "virtualApplications": [
+ {
+ "virtualPath": "/",
+ "physicalPath": "site\\wwwroot",
+ "preloadEnabled": true
+ }
+ ],
+ "loadBalancing": "LeastRequests",
+ "experiments": {
+ "rampUpRules": []
+ },
+ "autoHealEnabled": false,
+ "localMySqlEnabled": false,
+ "ipSecurityRestrictions": [
+ {
+ "ipAddress": "Any",
+ "action": "Allow",
+ "priority": 1,
+ "name": "Allow all",
+ "description": "Allow all access"
+ }
+ ],
+ "scmIpSecurityRestrictions": [
+ {
+ "ipAddress": "Any",
+ "action": "Allow",
+ "priority": 1,
+ "name": "Allow all",
+ "description": "Allow all access"
+ }
+ ],
+ "scmIpSecurityRestrictionsUseMain": false,
+ "http20Enabled": false,
+ "minTlsVersion": "1.2",
+ "ftpsState": "AllAllowed",
+ "reservedInstanceCount": 0
+ }
+ },
+ {
+ "apiVersion": "2017-12-01",
+ "type": "Microsoft.BotService/botServices",
+ "name": "[parameters('botId')]",
+ "location": "global",
+ "kind": "bot",
+ "sku": {
+ "name": "[parameters('botSku')]"
+ },
+ "properties": {
+ "name": "[parameters('botId')]",
+ "displayName": "[parameters('botId')]",
+ "endpoint": "[variables('botEndpoint')]",
+ "msaAppId": "[parameters('appId')]",
+ "developerAppInsightsApplicationId": null,
+ "developerAppInsightKey": null,
+ "publishingCredentials": null,
+ "storageResourceId": null
+ },
+ "dependsOn": [
+ "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]"
+ ]
+ }
+ ],
+ "outputs": {}
+ }
+ }
+ }
+ ]
+}
diff --git a/samples/13.core-bot/deploymentTemplates/template-with-preexisting-rg.json b/samples/13.core-bot/deploymentTemplates/template-with-preexisting-rg.json
new file mode 100644
index 000000000..024dcf08d
--- /dev/null
+++ b/samples/13.core-bot/deploymentTemplates/template-with-preexisting-rg.json
@@ -0,0 +1,259 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "appId": {
+ "type": "string",
+ "metadata": {
+ "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings."
+ }
+ },
+ "appSecret": {
+ "type": "string",
+ "metadata": {
+ "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings. Defaults to \"\"."
+ }
+ },
+ "botId": {
+ "type": "string",
+ "metadata": {
+ "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable."
+ }
+ },
+ "botSku": {
+ "defaultValue": "S1",
+ "type": "string",
+ "metadata": {
+ "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1."
+ }
+ },
+ "newAppServicePlanName": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The name of the new App Service Plan."
+ }
+ },
+ "newAppServicePlanSku": {
+ "type": "object",
+ "defaultValue": {
+ "name": "P1v2",
+ "tier": "PremiumV2",
+ "size": "P1v2",
+ "family": "Pv2",
+ "capacity": 1
+ },
+ "metadata": {
+ "description": "The SKU of the App Service Plan. Defaults to Standard values."
+ }
+ },
+ "appServicePlanLocation": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The location of the App Service Plan."
+ }
+ },
+ "existingAppServicePlan": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "Name of the existing App Service Plan used to create the Web App for the bot."
+ }
+ },
+ "newWebAppName": {
+ "type": "string",
+ "defaultValue": "",
+ "metadata": {
+ "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"."
+ }
+ }
+ },
+ "variables": {
+ "defaultAppServicePlanName": "[if(empty(parameters('existingAppServicePlan')), 'createNewAppServicePlan', parameters('existingAppServicePlan'))]",
+ "useExistingAppServicePlan": "[not(equals(variables('defaultAppServicePlanName'), 'createNewAppServicePlan'))]",
+ "servicePlanName": "[if(variables('useExistingAppServicePlan'), parameters('existingAppServicePlan'), parameters('newAppServicePlanName'))]",
+ "publishingUsername": "[concat('$', parameters('newWebAppName'))]",
+ "resourcesLocation": "[parameters('appServicePlanLocation')]",
+ "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]",
+ "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]",
+ "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]"
+ },
+ "resources": [
+ {
+ "comments": "Create a new Linux App Service Plan if no existing App Service Plan name was passed in.",
+ "type": "Microsoft.Web/serverfarms",
+ "condition": "[not(variables('useExistingAppServicePlan'))]",
+ "name": "[variables('servicePlanName')]",
+ "apiVersion": "2018-02-01",
+ "location": "[variables('resourcesLocation')]",
+ "sku": "[parameters('newAppServicePlanSku')]",
+ "kind": "linux",
+ "properties": {
+ "perSiteScaling": false,
+ "maximumElasticWorkerCount": 1,
+ "isSpot": false,
+ "reserved": true,
+ "isXenon": false,
+ "hyperV": false,
+ "targetWorkerCount": 0,
+ "targetWorkerSizeId": 0
+ }
+ },
+ {
+ "comments": "Create a Web App using a Linux App Service Plan",
+ "type": "Microsoft.Web/sites",
+ "apiVersion": "2018-11-01",
+ "location": "[variables('resourcesLocation')]",
+ "kind": "app,linux",
+ "dependsOn": [
+ "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]"
+ ],
+ "name": "[variables('webAppName')]",
+ "properties": {
+ "name": "[variables('webAppName')]",
+ "hostNameSslStates": [
+ {
+ "name": "[concat(parameters('newWebAppName'), '.azurewebsites.net')]",
+ "sslState": "Disabled",
+ "hostType": "Standard"
+ },
+ {
+ "name": "[concat(parameters('newWebAppName'), '.scm.azurewebsites.net')]",
+ "sslState": "Disabled",
+ "hostType": "Repository"
+ }
+ ],
+ "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]",
+ "reserved": true,
+ "isXenon": false,
+ "hyperV": false,
+ "scmSiteAlsoStopped": false,
+ "clientAffinityEnabled": true,
+ "clientCertEnabled": false,
+ "hostNamesDisabled": false,
+ "containerSize": 0,
+ "dailyMemoryTimeQuota": 0,
+ "httpsOnly": false,
+ "redundancyMode": "None",
+ "siteConfig": {
+ "appSettings": [
+ {
+ "name": "JAVA_OPTS",
+ "value": "-Dserver.port=80"
+ },
+ {
+ "name": "MicrosoftAppId",
+ "value": "[parameters('appId')]"
+ },
+ {
+ "name": "MicrosoftAppPassword",
+ "value": "[parameters('appSecret')]"
+ }
+ ],
+ "cors": {
+ "allowedOrigins": [
+ "https://botservice.hosting.portal.azure.net",
+ "https://hosting.onecloud.azure-test.net/"
+ ]
+ }
+ }
+ }
+ },
+ {
+ "type": "Microsoft.Web/sites/config",
+ "apiVersion": "2018-11-01",
+ "name": "[concat(variables('webAppName'), '/web')]",
+ "location": "[variables('resourcesLocation')]",
+ "dependsOn": [
+ "[resourceId('Microsoft.Web/sites/', variables('webAppName'))]"
+ ],
+ "properties": {
+ "numberOfWorkers": 1,
+ "defaultDocuments": [
+ "Default.htm",
+ "Default.html",
+ "Default.asp",
+ "index.htm",
+ "index.html",
+ "iisstart.htm",
+ "default.aspx",
+ "index.php",
+ "hostingstart.html"
+ ],
+ "netFrameworkVersion": "v4.0",
+ "linuxFxVersion": "JAVA|8-jre8",
+ "requestTracingEnabled": false,
+ "remoteDebuggingEnabled": false,
+ "httpLoggingEnabled": false,
+ "logsDirectorySizeLimit": 35,
+ "detailedErrorLoggingEnabled": false,
+ "publishingUsername": "[variables('publishingUsername')]",
+ "scmType": "None",
+ "use32BitWorkerProcess": true,
+ "webSocketsEnabled": false,
+ "alwaysOn": true,
+ "managedPipelineMode": "Integrated",
+ "virtualApplications": [
+ {
+ "virtualPath": "/",
+ "physicalPath": "site\\wwwroot",
+ "preloadEnabled": true
+ }
+ ],
+ "loadBalancing": "LeastRequests",
+ "experiments": {
+ "rampUpRules": []
+ },
+ "autoHealEnabled": false,
+ "localMySqlEnabled": false,
+ "ipSecurityRestrictions": [
+ {
+ "ipAddress": "Any",
+ "action": "Allow",
+ "priority": 1,
+ "name": "Allow all",
+ "description": "Allow all access"
+ }
+ ],
+ "scmIpSecurityRestrictions": [
+ {
+ "ipAddress": "Any",
+ "action": "Allow",
+ "priority": 1,
+ "name": "Allow all",
+ "description": "Allow all access"
+ }
+ ],
+ "scmIpSecurityRestrictionsUseMain": false,
+ "http20Enabled": false,
+ "minTlsVersion": "1.2",
+ "ftpsState": "AllAllowed",
+ "reservedInstanceCount": 0
+ }
+ },
+ {
+ "apiVersion": "2017-12-01",
+ "type": "Microsoft.BotService/botServices",
+ "name": "[parameters('botId')]",
+ "location": "global",
+ "kind": "bot",
+ "sku": {
+ "name": "[parameters('botSku')]"
+ },
+ "properties": {
+ "name": "[parameters('botId')]",
+ "displayName": "[parameters('botId')]",
+ "endpoint": "[variables('botEndpoint')]",
+ "msaAppId": "[parameters('appId')]",
+ "developerAppInsightsApplicationId": null,
+ "developerAppInsightKey": null,
+ "publishingCredentials": null,
+ "storageResourceId": null
+ },
+ "dependsOn": [
+ "[resourceId('Microsoft.Web/sites/', variables('webAppName'))]"
+ ]
+ }
+ ]
+}
diff --git a/samples/13.core-bot/pom.xml b/samples/13.core-bot/pom.xml
new file mode 100644
index 000000000..a75393538
--- /dev/null
+++ b/samples/13.core-bot/pom.xml
@@ -0,0 +1,253 @@
+
+
+
+ * The @Component annotation could be used on the Bot class instead of this method + * with the @Bean annotation. + *
+ * + * @return The Bot implementation for this application. + */ + @Bean + public Bot getBot( + ) { + Storage storage = this.getStorage(); + UserState userState = this.getUserState(storage); + ConversationState conversationState = this.getConversationState(storage); + Dialog rootDialog = this.getRootDialog(); + return new DialogAndWelcomeBot(conversationState, userState, rootDialog); + } + + /** + * Returns a FlightBookingRecognizer object. + * @return The FlightBookingRecognizer. + */ + @Bean + public FlightBookingRecognizer getFlightBookingRecognizer() { + Configuration configuration = this.getConfiguration(); + return new FlightBookingRecognizer(configuration); + } + + /** + * Returns a BookingDialog object. + * @return The BookingDialog. + */ + @Bean + public BookingDialog getBookingDialog() { + return new BookingDialog(); + } + + /** + * Returns the starting Dialog for this application. + * + *+ * The @Component annotation could be used on the Dialog class instead of this method + * with the @Bean annotation. + *
+ * + * @return The Dialog implementation for this application. + */ + @Bean + public Dialog getRootDialog() { + FlightBookingRecognizer flightBookingRecognizer = this.getFlightBookingRecognizer(); + BookingDialog bookingDialog = this.getBookingDialog(); + return new MainDialog(flightBookingRecognizer, bookingDialog); + } + + /** + * Returns a custom Adapter that provides error handling. + * + * @param configuration The Configuration object to use. + * @return An error handling BotFrameworkHttpAdapter. + */ + @Override + public BotFrameworkHttpAdapter getBotFrameworkHttpAdaptor(Configuration configuration) { + return new AdapterWithErrorHandler(configuration); + } +} + diff --git a/samples/13.core-bot/src/main/java/com/microsoft/bot/sample/core/BookingDetails.java b/samples/13.core-bot/src/main/java/com/microsoft/bot/sample/core/BookingDetails.java new file mode 100644 index 000000000..4e95a5807 --- /dev/null +++ b/samples/13.core-bot/src/main/java/com/microsoft/bot/sample/core/BookingDetails.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.bot.sample.core; + +/** + * The model class to retrieve the information of the booking. + */ +public class BookingDetails { + private String destination; + private String origin; + private String travelDate; + + /** + * Gets the destination of the booking. + * @return The destination. + */ + public String getDestination() { + return destination; + } + + + /** + * Sets the destination of the booking. + * @param withDestination The new destination. + */ + public void setDestination(String withDestination) { + this.destination = withDestination; + } + + /** + * Gets the origin of the booking. + * @return The origin. + */ + public String getOrigin() { + return origin; + } + + /** + * Sets the origin of the booking. + * @param withOrigin The new origin. + */ + public void setOrigin(String withOrigin) { + this.origin = withOrigin; + } + + /** + * Gets the travel date of the booking. + * @return The travel date. + */ + public String getTravelDate() { + return travelDate; + } + + /** + * Sets the travel date of the booking. + * @param withTravelDate The new travel date. + */ + public void setTravelDate(String withTravelDate) { + this.travelDate = withTravelDate; + } +} diff --git a/samples/13.core-bot/src/main/java/com/microsoft/bot/sample/core/BookingDialog.java b/samples/13.core-bot/src/main/java/com/microsoft/bot/sample/core/BookingDialog.java new file mode 100644 index 000000000..5af80feb0 --- /dev/null +++ b/samples/13.core-bot/src/main/java/com/microsoft/bot/sample/core/BookingDialog.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.bot.sample.core; + +import com.microsoft.bot.builder.MessageFactory; +import com.microsoft.bot.dialogs.DialogTurnResult; +import com.microsoft.bot.dialogs.WaterfallDialog; +import com.microsoft.bot.dialogs.WaterfallStep; +import com.microsoft.bot.dialogs.WaterfallStepContext; +import com.microsoft.bot.dialogs.prompts.ConfirmPrompt; +import com.microsoft.bot.dialogs.prompts.PromptOptions; +import com.microsoft.bot.dialogs.prompts.TextPrompt; +import com.microsoft.bot.schema.Activity; +import com.microsoft.bot.schema.InputHints; +import com.microsoft.recognizers.datatypes.timex.expression.Constants; +import com.microsoft.recognizers.datatypes.timex.expression.TimexProperty; + +import java.util.Arrays; +import java.util.concurrent.CompletableFuture; + +/** + * The class containing the booking dialogs. + */ +public class BookingDialog extends CancelAndHelpDialog { + private final String destinationStepMsgText = "Where would you like to travel to?"; + private final String originStepMsgText = "Where are you traveling from?"; + + /** + * The constructor of the Booking Dialog class. + */ + public BookingDialog() { + super("BookingDialog"); + + addDialog(new TextPrompt("TextPrompt")); + addDialog(new ConfirmPrompt("ConfirmPrompt")); + addDialog(new DateResolverDialog(null)); + WaterfallStep[] waterfallSteps = { + this::destinationStep, + this::originStep, + this::travelDateStep, + this::confirmStep, + this::finalStep + }; + addDialog(new WaterfallDialog("WaterfallDialog", Arrays.asList(waterfallSteps))); + + // The initial child Dialog to run. + setInitialDialogId("WaterfallDialog"); + } + + + private CompletableFuture