This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch NLPCRAFT-491
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-491 by this push:
     new 5807bbae WIP.
5807bbae is described below

commit 5807bbae8f7f796c1227bfa2cdae755e64c781c0
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Apr 5 23:32:13 2022 +0300

    WIP.
---
 .../src/main/java/org/apache/nlpcraft/examples/order/Order.scala    | 2 +-
 .../main/java/org/apache/nlpcraft/examples/order/OrderModel.scala   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/Order.scala
 
b/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/Order.scala
index faa4e35f..5b14b106 100644
--- 
a/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/Order.scala
+++ 
b/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/Order.scala
@@ -23,7 +23,7 @@ case class Pizza(name: String, var size: Option[String], qty: 
Option[Int])
 case class Drink(name: String, qty: Option[Int])
 
 enum State:
-    case ORDER_EMPTY, ORDER_INVALID, ORDER_VALID, CONTINUE_ASK, CONFIRM_ASK, 
CANCEL_ASK
+    case ORDER_EMPTY, ORDER_INVALID, ORDER_VALID, ASK_CONTINUE, ASK_CONFIRM, 
ASK_CANCEL
 
 import org.apache.nlpcraft.examples.order.State.*
 
diff --git 
a/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/OrderModel.scala
 
b/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/OrderModel.scala
index 39240307..47ab58e6 100644
--- 
a/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/OrderModel.scala
+++ 
b/nlpcraft-examples/order/src/main/java/org/apache/nlpcraft/examples/order/OrderModel.scala
@@ -165,7 +165,7 @@ class OrderModel extends NCModelAdapter (
 
         o.getState match
             case ORDER_VALID | ORDER_INVALID =>
-                o.setState(CANCEL_ASK)
+                o.setState(ASK_CANCEL)
                 NCResult("Are you sure that you want to cancel current 
order?", ASK_DIALOG)
             case _ => NCResult("Nothing to cancel.", ASK_RESULT)
 
@@ -203,8 +203,8 @@ class OrderModel extends NCModelAdapter (
         val o = getOrder(im)
 
         o.getState match
-            case ORDER_VALID | CONTINUE_ASK =>
-                o.setState(CONFIRM_ASK)
+            case ORDER_VALID | ASK_CONTINUE =>
+                o.setState(ASK_CONFIRM)
                 mkOrderConfirmDialog(o)
             case _ => NCResult("Nothing to finish.", ASK_RESULT)
 

Reply via email to