From 6e36b7ad46cac8be1fae6c127951181698d35b79 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 17:36:01 -0600 Subject: [PATCH 01/12] changed name of constant to match Java conventions --- .../practice/src/main/java/getversion/Constants.java | 2 +- .../practice/src/main/java/getversion/LoanProcessingWorker.java | 2 +- .../practice/src/main/java/getversion/Starter.java | 2 +- .../solution/src/main/java/getversion/Constants.java | 2 +- .../solution/src/main/java/getversion/LoanProcessingWorker.java | 2 +- .../solution/src/main/java/getversion/Starter.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/version-workflow/practice/src/main/java/getversion/Constants.java b/exercises/version-workflow/practice/src/main/java/getversion/Constants.java index 0113d44..b737104 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/Constants.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/Constants.java @@ -2,6 +2,6 @@ public class Constants { - public static final String taskQueueName = "loan-processing-workflow-taskqueue"; + public static final String TASK_QUEUE_NAME = "loan-processing-workflow-taskqueue"; } diff --git a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorker.java b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorker.java index 40ba8ca..f1c803a 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorker.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorker.java @@ -12,7 +12,7 @@ public static void main(String[] args) { WorkflowClient client = WorkflowClient.newInstance(service); WorkerFactory factory = WorkerFactory.newInstance(client); - Worker worker = factory.newWorker(Constants.taskQueueName); + Worker worker = factory.newWorker(Constants.TASK_QUEUE_NAME); worker.registerWorkflowImplementationTypes(LoanProcessingWorkflowImpl.class); diff --git a/exercises/version-workflow/practice/src/main/java/getversion/Starter.java b/exercises/version-workflow/practice/src/main/java/getversion/Starter.java index 2612751..ad90797 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/Starter.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/Starter.java @@ -22,7 +22,7 @@ public static void main(String[] args) { WorkflowOptions options = WorkflowOptions.newBuilder() .setWorkflowId("loan-processing-workflow-customer-" + info.getCustomerID()) - .setTaskQueue(Constants.taskQueueName).build(); + .setTaskQueue(Constants.TASK_QUEUE_NAME).build(); LoanProcessingWorkflow workflow = client.newWorkflowStub(LoanProcessingWorkflow.class, options); diff --git a/exercises/version-workflow/solution/src/main/java/getversion/Constants.java b/exercises/version-workflow/solution/src/main/java/getversion/Constants.java index 0113d44..b737104 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/Constants.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/Constants.java @@ -2,6 +2,6 @@ public class Constants { - public static final String taskQueueName = "loan-processing-workflow-taskqueue"; + public static final String TASK_QUEUE_NAME = "loan-processing-workflow-taskqueue"; } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorker.java b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorker.java index 40ba8ca..f1c803a 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorker.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorker.java @@ -12,7 +12,7 @@ public static void main(String[] args) { WorkflowClient client = WorkflowClient.newInstance(service); WorkerFactory factory = WorkerFactory.newInstance(client); - Worker worker = factory.newWorker(Constants.taskQueueName); + Worker worker = factory.newWorker(Constants.TASK_QUEUE_NAME); worker.registerWorkflowImplementationTypes(LoanProcessingWorkflowImpl.class); diff --git a/exercises/version-workflow/solution/src/main/java/getversion/Starter.java b/exercises/version-workflow/solution/src/main/java/getversion/Starter.java index 6bffc12..c7808b4 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/Starter.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/Starter.java @@ -22,7 +22,7 @@ public static void main(String[] args) { WorkflowOptions options = WorkflowOptions.newBuilder() .setWorkflowId("loan-processing-workflow-customer-" + info.getCustomerID()) - .setTaskQueue(Constants.taskQueueName) + .setTaskQueue(Constants.TASK_QUEUE_NAME) .build(); LoanProcessingWorkflow workflow = client.newWorkflowStub(LoanProcessingWorkflow.class, options); From 6fa284647e5292941515c757ea2b9a1710c52c9d Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 17:41:21 -0600 Subject: [PATCH 02/12] updated to the latest Temporal SDK version --- exercises/version-workflow/practice/pom.xml | 4 ++-- exercises/version-workflow/solution/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/version-workflow/practice/pom.xml b/exercises/version-workflow/practice/pom.xml index 5bb7cc3..76d4d76 100644 --- a/exercises/version-workflow/practice/pom.xml +++ b/exercises/version-workflow/practice/pom.xml @@ -22,7 +22,7 @@ io.temporal temporal-sdk - 1.31.0 + 1.32.1 @@ -40,7 +40,7 @@ io.temporal temporal-testing - 1.31.0 + 1.32.1 test diff --git a/exercises/version-workflow/solution/pom.xml b/exercises/version-workflow/solution/pom.xml index 955b1f0..d7293e7 100644 --- a/exercises/version-workflow/solution/pom.xml +++ b/exercises/version-workflow/solution/pom.xml @@ -22,7 +22,7 @@ io.temporal temporal-sdk - 1.31.0 + 1.32.1 @@ -40,7 +40,7 @@ io.temporal temporal-testing - 1.31.0 + 1.32.1 test From 47013e154437e822482941fabb5017b4eff60df2 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 17:45:54 -0600 Subject: [PATCH 03/12] fixed formatting so that it matches the solution version --- .../practice/src/main/java/getversion/Starter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/version-workflow/practice/src/main/java/getversion/Starter.java b/exercises/version-workflow/practice/src/main/java/getversion/Starter.java index ad90797..c7808b4 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/Starter.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/Starter.java @@ -22,7 +22,8 @@ public static void main(String[] args) { WorkflowOptions options = WorkflowOptions.newBuilder() .setWorkflowId("loan-processing-workflow-customer-" + info.getCustomerID()) - .setTaskQueue(Constants.TASK_QUEUE_NAME).build(); + .setTaskQueue(Constants.TASK_QUEUE_NAME) + .build(); LoanProcessingWorkflow workflow = client.newWorkflowStub(LoanProcessingWorkflow.class, options); From d20a1fa0c53c7b00a48182b84035052c1db8f6ca Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 18:26:51 -0600 Subject: [PATCH 04/12] renamed customerID to follow Java coventions and normalized whitespace --- .../java/getversion/model/ChargeInput.java | 12 +- .../java/getversion/model/CustomerInfo.java | 13 +- .../getversion/model/SimpleCustomerMap.java | 7 +- .../LoanProcessingActivitiesImpl.java | 12 +- .../java/getversion/model/ChargeInput.java | 91 +++++++------- .../java/getversion/model/CustomerInfo.java | 112 +++++++++--------- .../model/CustomerInfoDatabase.java | 2 +- .../getversion/model/SimpleCustomerMap.java | 42 +++---- 8 files changed, 143 insertions(+), 148 deletions(-) diff --git a/exercises/version-workflow/practice/src/main/java/getversion/model/ChargeInput.java b/exercises/version-workflow/practice/src/main/java/getversion/model/ChargeInput.java index f45a905..ed37163 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/model/ChargeInput.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/model/ChargeInput.java @@ -1,26 +1,26 @@ package getversion.model; public class ChargeInput { - private String customerID; + private String customerId; private int amount; private int periodNumber; private int numberOfPeriods; public ChargeInput() {} - public ChargeInput(String customerID, int amount, int periodNumber, int numberOfPeriods) { - this.customerID = customerID; + public ChargeInput(String customerId, int amount, int periodNumber, int numberOfPeriods) { + this.customerId = customerId; this.amount = amount; this.periodNumber = periodNumber; this.numberOfPeriods = numberOfPeriods; } public String getCustomerID() { - return customerID; + return customerId; } - public void setCustomerID(String customerID) { - this.customerID = customerID; + public void setCustomerID(String customerId) { + this.customerId = customerId; } public int getAmount() { diff --git a/exercises/version-workflow/practice/src/main/java/getversion/model/CustomerInfo.java b/exercises/version-workflow/practice/src/main/java/getversion/model/CustomerInfo.java index 77db37e..ebc102e 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/model/CustomerInfo.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/model/CustomerInfo.java @@ -1,7 +1,7 @@ package getversion.model; public class CustomerInfo { - private String customerID; + private String customerId; private String name; private String emailAddress; private int amount; @@ -9,9 +9,8 @@ public class CustomerInfo { public CustomerInfo() {} - public CustomerInfo(String customerID, String name, String emailAddress, int amount, - int numberOfPeriods) { - this.customerID = customerID; + public CustomerInfo(String customerId, String name, String emailAddress, int amount, int numberOfPeriods) { + this.customerId = customerId; this.name = name; this.emailAddress = emailAddress; this.amount = amount; @@ -19,11 +18,11 @@ public CustomerInfo(String customerID, String name, String emailAddress, int amo } public String getCustomerID() { - return customerID; + return customerId; } - public void setCustomerID(String customerID) { - this.customerID = customerID; + public void setCustomerID(String customerId) { + this.customerId = customerId; } public String getName() { diff --git a/exercises/version-workflow/practice/src/main/java/getversion/model/SimpleCustomerMap.java b/exercises/version-workflow/practice/src/main/java/getversion/model/SimpleCustomerMap.java index 4fc9d2e..bf903a0 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/model/SimpleCustomerMap.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/model/SimpleCustomerMap.java @@ -15,8 +15,7 @@ private void populate() { CustomerInfo customer01 = new CustomerInfo("a100", "Ana Garcia", "ana@example.com", 500, 10); CustomerInfo customer02 = new CustomerInfo("a101", "Amit Singh", "asingh@example.com", 250, 15); - CustomerInfo customer03 = - new CustomerInfo("a102", "Mary O'Connor", "marymo@example.com", 425, 12); + CustomerInfo customer03 = new CustomerInfo("a102", "Mary O'Connor", "marymo@example.com", 425, 12); customers.put(customer01.getCustomerID(), customer01); customers.put(customer02.getCustomerID(), customer02); @@ -24,8 +23,8 @@ private void populate() { } @Override - public CustomerInfo get(String customerID) { - CustomerInfo info = customers.get(customerID); + public CustomerInfo get(String customerId) { + CustomerInfo info = customers.get(customerId); if (info == null) { throw new RuntimeException("Customer ID does not exist in the database"); } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivitiesImpl.java b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivitiesImpl.java index 255e3ae..1dd8c9d 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivitiesImpl.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivitiesImpl.java @@ -11,16 +11,16 @@ public class LoanProcessingActivitiesImpl implements LoanProcessingActivities { @Override public String chargeCustomer(ChargeInput input) { - String customerID = input.getCustomerID(); + String customerId = input.getCustomerID(); int amount = input.getAmount(); int numberOfPeriods = input.getNumberOfPeriods(); logger.info("*** Charging customer***: CustomerID: {}, Amount {}, Number of Periods: {}", - customerID, amount, numberOfPeriods); + customerId, amount, numberOfPeriods); // pretend we charge them - String confirmation = String.format("Charged %d to customer '%s'", amount, customerID); + String confirmation = String.format("Charged %d to customer '%s'", amount, customerId); return confirmation; @@ -29,14 +29,14 @@ public String chargeCustomer(ChargeInput input) { @Override public String sendThankYouToCustomer(CustomerInfo input) { - String customerID = input.getCustomerID(); + String customerId = input.getCustomerID(); String email = input.getEmailAddress(); logger.info("*** Sending thank you message to Customer ***: CustomerID: {}, Email {}", - customerID, email); + customerId, email); - String confirmation = String.format("Sent thank you message to customer '%s'", customerID); + String confirmation = String.format("Sent thank you message to customer '%s'", customerId); return confirmation; } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/model/ChargeInput.java b/exercises/version-workflow/solution/src/main/java/getversion/model/ChargeInput.java index 73dae9b..ed37163 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/model/ChargeInput.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/model/ChargeInput.java @@ -1,50 +1,49 @@ package getversion.model; public class ChargeInput { - private String customerID; - private int amount; - private int periodNumber; - private int numberOfPeriods; - - public ChargeInput() { - } - - public ChargeInput(String customerID, int amount, int periodNumber, int numberOfPeriods) { - this.customerID = customerID; - this.amount = amount; - this.periodNumber = periodNumber; - this.numberOfPeriods = numberOfPeriods; - } - - public String getCustomerID() { - return customerID; - } - - public void setCustomerID(String customerID) { - this.customerID = customerID; - } - - public int getAmount() { - return amount; - } - - public void setAmount(int amount) { - this.amount = amount; - } - - public int getPeriodNumber() { - return periodNumber; - } - - public void setPeriodNumber(int periodNumber) { - this.periodNumber = periodNumber; - } - - public int getNumberOfPeriods() { - return numberOfPeriods; - } - - public void setNumberOfPeriods(int numberOfPeriods) { - this.numberOfPeriods = numberOfPeriods; - } + private String customerId; + private int amount; + private int periodNumber; + private int numberOfPeriods; + + public ChargeInput() {} + + public ChargeInput(String customerId, int amount, int periodNumber, int numberOfPeriods) { + this.customerId = customerId; + this.amount = amount; + this.periodNumber = periodNumber; + this.numberOfPeriods = numberOfPeriods; + } + + public String getCustomerID() { + return customerId; + } + + public void setCustomerID(String customerId) { + this.customerId = customerId; + } + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public int getPeriodNumber() { + return periodNumber; + } + + public void setPeriodNumber(int periodNumber) { + this.periodNumber = periodNumber; + } + + public int getNumberOfPeriods() { + return numberOfPeriods; + } + + public void setNumberOfPeriods(int numberOfPeriods) { + this.numberOfPeriods = numberOfPeriods; + } } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfo.java b/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfo.java index 719d251..ebc102e 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfo.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfo.java @@ -1,61 +1,59 @@ package getversion.model; public class CustomerInfo { - private String customerID; - private String name; - private String emailAddress; - private int amount; - private int numberOfPeriods; - - public CustomerInfo() { - - } - - public CustomerInfo(String customerID, String name, String emailAddress, int amount, int numberOfPeriods) { - this.customerID = customerID; - this.name = name; - this.emailAddress = emailAddress; - this.amount = amount; - this.numberOfPeriods = numberOfPeriods; - } - - public String getCustomerID() { - return customerID; - } - - public void setCustomerID(String customerID) { - this.customerID = customerID; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmailAddress() { - return emailAddress; - } - - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public int getAmount() { - return amount; - } - - public void setAmount(int amount) { - this.amount = amount; - } - - public int getNumberOfPeriods() { - return numberOfPeriods; - } - - public void setNumberOfPeriods(int numberOfPeriods) { - this.numberOfPeriods = numberOfPeriods; - } + private String customerId; + private String name; + private String emailAddress; + private int amount; + private int numberOfPeriods; + + public CustomerInfo() {} + + public CustomerInfo(String customerId, String name, String emailAddress, int amount, int numberOfPeriods) { + this.customerId = customerId; + this.name = name; + this.emailAddress = emailAddress; + this.amount = amount; + this.numberOfPeriods = numberOfPeriods; + } + + public String getCustomerID() { + return customerId; + } + + public void setCustomerID(String customerId) { + this.customerId = customerId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmailAddress() { + return emailAddress; + } + + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public int getNumberOfPeriods() { + return numberOfPeriods; + } + + public void setNumberOfPeriods(int numberOfPeriods) { + this.numberOfPeriods = numberOfPeriods; + } } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfoDatabase.java b/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfoDatabase.java index baa2242..0b2798c 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfoDatabase.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/model/CustomerInfoDatabase.java @@ -1,5 +1,5 @@ package getversion.model; public interface CustomerInfoDatabase { - CustomerInfo get(String customerID); + CustomerInfo get(String customerId); } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/model/SimpleCustomerMap.java b/exercises/version-workflow/solution/src/main/java/getversion/model/SimpleCustomerMap.java index 0d942e2..bf903a0 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/model/SimpleCustomerMap.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/model/SimpleCustomerMap.java @@ -4,31 +4,31 @@ import java.util.Map; public class SimpleCustomerMap implements CustomerInfoDatabase { - private Map customers; + private Map customers; - public SimpleCustomerMap() { - populate(); - } - - private void populate() { - customers = new HashMap<>(); + public SimpleCustomerMap() { + populate(); + } - CustomerInfo customer01 = new CustomerInfo("a100", "Ana Garcia", "ana@example.com", 500, 10); - CustomerInfo customer02 = new CustomerInfo("a101", "Amit Singh", "asingh@example.com", 250, 15); - CustomerInfo customer03 = new CustomerInfo("a102", "Mary O'Connor", "marymo@example.com", 425, 12); + private void populate() { + customers = new HashMap<>(); - customers.put(customer01.getCustomerID(), customer01); - customers.put(customer02.getCustomerID(), customer02); - customers.put(customer03.getCustomerID(), customer03); - } + CustomerInfo customer01 = new CustomerInfo("a100", "Ana Garcia", "ana@example.com", 500, 10); + CustomerInfo customer02 = new CustomerInfo("a101", "Amit Singh", "asingh@example.com", 250, 15); + CustomerInfo customer03 = new CustomerInfo("a102", "Mary O'Connor", "marymo@example.com", 425, 12); - @Override - public CustomerInfo get(String customerID) { - CustomerInfo info = customers.get(customerID); - if (info == null) { - throw new RuntimeException("Customer ID does not exist in the database"); - } + customers.put(customer01.getCustomerID(), customer01); + customers.put(customer02.getCustomerID(), customer02); + customers.put(customer03.getCustomerID(), customer03); + } - return info; + @Override + public CustomerInfo get(String customerId) { + CustomerInfo info = customers.get(customerId); + if (info == null) { + throw new RuntimeException("Customer ID does not exist in the database"); } + + return info; + } } From de5de61543066e9e54dfa1d11b3d07debc03e221 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 18:28:28 -0600 Subject: [PATCH 05/12] removed unnecessary package statement (which didn't match directory structure) --- samples/fetch-event-history/RequestHistory.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/fetch-event-history/RequestHistory.java b/samples/fetch-event-history/RequestHistory.java index 167db1f..8f210bd 100644 --- a/samples/fetch-event-history/RequestHistory.java +++ b/samples/fetch-event-history/RequestHistory.java @@ -1,5 +1,3 @@ -package getversion; - import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; From 8b019031aa1727faa300f41582efe510bbe639de Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:05:06 -0600 Subject: [PATCH 06/12] removed redundant 'public' modifiers from interface members --- .../src/main/java/getversion/LoanProcessingActivities.java | 4 ++-- .../src/main/java/getversion/LoanProcessingWorkflow.java | 2 +- .../src/main/java/getversion/LoanProcessingActivities.java | 4 ++-- .../src/main/java/getversion/LoanProcessingWorkflow.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingActivities.java b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingActivities.java index 5e417ad..7b0c33d 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingActivities.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingActivities.java @@ -7,8 +7,8 @@ @ActivityInterface public interface LoanProcessingActivities { - public String chargeCustomer(ChargeInput input); + String chargeCustomer(ChargeInput input); - public String sendThankYouToCustomer(CustomerInfo input); + String sendThankYouToCustomer(CustomerInfo input); } diff --git a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflow.java b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflow.java index da61a95..88b1d2a 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflow.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflow.java @@ -8,6 +8,6 @@ public interface LoanProcessingWorkflow { @WorkflowMethod - public String loanProcessingWorkflow(CustomerInfo info); + String loanProcessingWorkflow(CustomerInfo info); } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivities.java b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivities.java index 5e417ad..7b0c33d 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivities.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingActivities.java @@ -7,8 +7,8 @@ @ActivityInterface public interface LoanProcessingActivities { - public String chargeCustomer(ChargeInput input); + String chargeCustomer(ChargeInput input); - public String sendThankYouToCustomer(CustomerInfo input); + String sendThankYouToCustomer(CustomerInfo input); } diff --git a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflow.java b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflow.java index da61a95..88b1d2a 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflow.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflow.java @@ -8,6 +8,6 @@ public interface LoanProcessingWorkflow { @WorkflowMethod - public String loanProcessingWorkflow(CustomerInfo info); + String loanProcessingWorkflow(CustomerInfo info); } From 3c5a4a80a17af4b42fdf0fd74be2833afa6484d6 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:07:00 -0600 Subject: [PATCH 07/12] added import to match the solution version, since the instructions did not mention the need to add the important and the code won't compile without it --- .../src/main/java/getversion/LoanProcessingWorkflowImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java index aecd13e..d1960fa 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java @@ -8,6 +8,7 @@ import org.slf4j.Logger; import java.time.Duration; +import java.util.Arrays; import java.util.List; public class LoanProcessingWorkflowImpl implements LoanProcessingWorkflow { From e11748e50bb604a08374bac9f9b3323cb6b44821 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:08:23 -0600 Subject: [PATCH 08/12] reformatted builder pattern statement, as per conventions (and to match the 'practice' version) --- .../src/main/java/getversion/LoanProcessingWorkflowImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java index 50013d3..47f417c 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java @@ -18,7 +18,9 @@ public class LoanProcessingWorkflowImpl implements LoanProcessingWorkflow { public static final SearchAttributeKey> TEMPORAL_CHANGE_VERSION = SearchAttributeKey.forKeywordList("TemporalChangeVersion"); ActivityOptions options = - ActivityOptions.newBuilder().setStartToCloseTimeout(Duration.ofSeconds(5)).build(); + ActivityOptions.newBuilder() + .setStartToCloseTimeout(Duration.ofSeconds(5)) + .build(); private final LoanProcessingActivities activities = Workflow.newActivityStub(LoanProcessingActivities.class, options); From 5065fdefb1c4741bcf00d31747aafbf974f2a1a6 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:11:47 -0600 Subject: [PATCH 09/12] slight reformat to better match the practice version --- .../java/getversion/LoanProcessingWorkflowImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java index 47f417c..c4cee7c 100644 --- a/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java +++ b/exercises/version-workflow/solution/src/main/java/getversion/LoanProcessingWorkflowImpl.java @@ -17,10 +17,9 @@ public class LoanProcessingWorkflowImpl implements LoanProcessingWorkflow { public static final SearchAttributeKey> TEMPORAL_CHANGE_VERSION = SearchAttributeKey.forKeywordList("TemporalChangeVersion"); - ActivityOptions options = - ActivityOptions.newBuilder() - .setStartToCloseTimeout(Duration.ofSeconds(5)) - .build(); + ActivityOptions options = ActivityOptions.newBuilder() + .setStartToCloseTimeout(Duration.ofSeconds(5)) + .build(); private final LoanProcessingActivities activities = Workflow.newActivityStub(LoanProcessingActivities.class, options); @@ -61,8 +60,7 @@ public String loanProcessingWorkflow(CustomerInfo info) { } if (version == 1) { - // for workflow executions started before the change, send thank you before the - // loop + // for workflow executions started before the change, send thank you before the loop String confirmation = activities.sendThankYouToCustomer(info); } From 79adc410b9c1ce5f2cfe5a35dc94a1806b0e1ca3 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:14:01 -0600 Subject: [PATCH 10/12] removed unused statement (which was not in the solution version) --- .../src/main/java/getversion/LoanProcessingWorkflowImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java index d1960fa..d9094cc 100644 --- a/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java +++ b/exercises/version-workflow/practice/src/main/java/getversion/LoanProcessingWorkflowImpl.java @@ -27,7 +27,6 @@ public String loanProcessingWorkflow(CustomerInfo info) { String customerId = info.getCustomerID(); int amount = info.getAmount(); - String email = info.getEmailAddress(); int numberOfPeriods = info.getNumberOfPeriods(); int totalPaid = 0; From 83bb9afc2118e86a9d22059efeb0275c2ecaff33 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:27:57 -0600 Subject: [PATCH 11/12] downgraded junit-jupiter library to workaround bug in newer version --- exercises/version-workflow/practice/pom.xml | 2 +- exercises/version-workflow/solution/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/version-workflow/practice/pom.xml b/exercises/version-workflow/practice/pom.xml index 76d4d76..3a46749 100644 --- a/exercises/version-workflow/practice/pom.xml +++ b/exercises/version-workflow/practice/pom.xml @@ -47,7 +47,7 @@ org.junit.jupiter junit-jupiter - 5.14.1 + 5.11.4 test diff --git a/exercises/version-workflow/solution/pom.xml b/exercises/version-workflow/solution/pom.xml index d7293e7..9ccb3d2 100644 --- a/exercises/version-workflow/solution/pom.xml +++ b/exercises/version-workflow/solution/pom.xml @@ -47,7 +47,7 @@ org.junit.jupiter junit-jupiter - 5.14.1 + 5.11.4 test From 5362172a3138de1d528fdede09112bfd3c8e13b6 Mon Sep 17 00:00:00 2001 From: Tom Wheeler Date: Wed, 14 Jan 2026 19:31:03 -0600 Subject: [PATCH 12/12] fix whitespace in code excerpt to match the source file --- exercises/version-workflow/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/version-workflow/README.md b/exercises/version-workflow/README.md index 48e9260..50ad894 100644 --- a/exercises/version-workflow/README.md +++ b/exercises/version-workflow/README.md @@ -120,7 +120,7 @@ String versionKey = "MovedThankYouAfterLoop"; int version = Workflow.getVersion(versionKey, Workflow.DEFAULT_VERSION, 1); if (version != Workflow.DEFAULT_VERSION) { -Workflow.upsertTypedSearchAttributes(TEMPORAL_CHANGE_VERSION + Workflow.upsertTypedSearchAttributes(TEMPORAL_CHANGE_VERSION .valueSet(Arrays.asList((versionKey + "-" + version)))); } ```