From d17602e48ed7cd570441c2532c28dc3c7e535cd7 Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 28 Aug 2024 14:20:00 +0200 Subject: [PATCH] [Fix #3642] Gonzalos comments --- springboot/addons/task-notification/pom.xml | 2 +- .../notification/spring/SpringNotificationEventPublisher.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/springboot/addons/task-notification/pom.xml b/springboot/addons/task-notification/pom.xml index 88118cc3054..4c47cdce503 100644 --- a/springboot/addons/task-notification/pom.xml +++ b/springboot/addons/task-notification/pom.xml @@ -49,7 +49,7 @@ org.kie.kogito - kogito-events-api + kogito-events-core diff --git a/springboot/addons/task-notification/src/main/java/org/kie/kogito/task/notification/spring/SpringNotificationEventPublisher.java b/springboot/addons/task-notification/src/main/java/org/kie/kogito/task/notification/spring/SpringNotificationEventPublisher.java index 09941746388..46c0e4b71d3 100644 --- a/springboot/addons/task-notification/src/main/java/org/kie/kogito/task/notification/spring/SpringNotificationEventPublisher.java +++ b/springboot/addons/task-notification/src/main/java/org/kie/kogito/task/notification/spring/SpringNotificationEventPublisher.java @@ -22,6 +22,7 @@ import org.kie.kogito.event.DataEvent; import org.kie.kogito.event.EventPublisher; +import org.kie.kogito.event.usertask.UserTaskInstanceDeadlineDataEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -42,7 +43,7 @@ public class SpringNotificationEventPublisher implements EventPublisher { @Override public void publish(DataEvent event) { - if (event.getType().startsWith("UserTaskDeadline")) { + if (event instanceof UserTaskInstanceDeadlineDataEvent) { logger.debug("About to publish event {} to Kafka topic {}", event, topic); try { emitter.send(topic, event);