From 1777c4ae8fc6379ab2ffb5fac22393affcb743d2 Mon Sep 17 00:00:00 2001 From: Janik Dotzel Date: Wed, 21 Aug 2024 18:04:23 +0200 Subject: [PATCH] fix dc example by adding the event handler for the CustomerMarkedVip event --- .../src/main/java/shopping/cart/ShoppingCart.java | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/replicated/shopping-cart-service-java/src/main/java/shopping/cart/ShoppingCart.java b/samples/replicated/shopping-cart-service-java/src/main/java/shopping/cart/ShoppingCart.java index 7ad153f34..8d26419af 100644 --- a/samples/replicated/shopping-cart-service-java/src/main/java/shopping/cart/ShoppingCart.java +++ b/samples/replicated/shopping-cart-service-java/src/main/java/shopping/cart/ShoppingCart.java @@ -525,6 +525,7 @@ public EventHandler eventHandler() { .forAnyState() .onEvent( ItemUpdated.class, (state, event) -> state.updateItem(event.itemId, event.quantity)) + .onEvent(CustomerMarkedVip.class, (state, event) -> state.markCustomerVip()) .onEvent( Closed.class, (state, event) -> {