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);