From d19546dc89183c4dc157f36952c3495fbeea9c9a Mon Sep 17 00:00:00 2001
From: Damien MARCHAT <dmarchat@takima.fr>
Date: Thu, 13 Mar 2025 11:45:31 +0100
Subject: [PATCH] Day 1 part 1.1

---
 pom.xml                                                |  6 +++++-
 .../bakery/cookie/BestCookieWorkflow.java              |  9 ++++++---
 .../temporalpractice/bakery/cookie/CookieWorkflow.java | 10 ++++++++++
 3 files changed, 21 insertions(+), 4 deletions(-)
 create mode 100644 src/main/java/io/takima/temporalpractice/bakery/cookie/CookieWorkflow.java

diff --git a/pom.xml b/pom.xml
index a1fb653..aa6e70b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,11 @@
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter</artifactId>
 		</dependency>
-
+		<dependency>
+			<groupId>io.temporal</groupId>
+			<artifactId>temporal-sdk</artifactId>
+			<version>1.28.0</version>
+		</dependency>
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-test</artifactId>
diff --git a/src/main/java/io/takima/temporalpractice/bakery/cookie/BestCookieWorkflow.java b/src/main/java/io/takima/temporalpractice/bakery/cookie/BestCookieWorkflow.java
index 68fa240..76e6fec 100644
--- a/src/main/java/io/takima/temporalpractice/bakery/cookie/BestCookieWorkflow.java
+++ b/src/main/java/io/takima/temporalpractice/bakery/cookie/BestCookieWorkflow.java
@@ -1,7 +1,10 @@
 package io.takima.temporalpractice.bakery.cookie;
 
-public class BestCookieWorkflow {
+public class BestCookieWorkflow implements CookieWorkflow {
+    @Override
     public void orderCookie() {
-        System.out.println("Cookie ordered... Miam");
+        // Note: System.out.println is used here for simplicity
+        // In real applications, you should use proper Workflow-aware logging (we'll cover this in Day 2)
+        System.out.println("Cookie ordered... Yuum");
     }
-}
+}
\ No newline at end of file
diff --git a/src/main/java/io/takima/temporalpractice/bakery/cookie/CookieWorkflow.java b/src/main/java/io/takima/temporalpractice/bakery/cookie/CookieWorkflow.java
new file mode 100644
index 0000000..80ba653
--- /dev/null
+++ b/src/main/java/io/takima/temporalpractice/bakery/cookie/CookieWorkflow.java
@@ -0,0 +1,10 @@
+package io.takima.temporalpractice.bakery.cookie;
+
+import io.temporal.workflow.WorkflowInterface;
+import io.temporal.workflow.WorkflowMethod;
+
+@WorkflowInterface
+public interface CookieWorkflow {
+    @WorkflowMethod
+    void orderCookie();
+}
\ No newline at end of file
-- 
GitLab