From 51bcadeb6c84e27d84b0c4aa963f31decd65da78 Mon Sep 17 00:00:00 2001 From: Enrique Gonzalez Martinez Date: Thu, 5 Oct 2023 12:02:08 +0200 Subject: [PATCH] [incubator-kie-issues-597] PIM fails to handle timers when org.jbpm.timer.disableUnmarshallerRegistration is set to true --- .../src/main/java/org/drools/core/time/TimerService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drools-core/src/main/java/org/drools/core/time/TimerService.java b/drools-core/src/main/java/org/drools/core/time/TimerService.java index f64d816df52..8ddf2028529 100644 --- a/drools-core/src/main/java/org/drools/core/time/TimerService.java +++ b/drools-core/src/main/java/org/drools/core/time/TimerService.java @@ -17,6 +17,7 @@ package org.drools.core.time; import java.util.Collection; +import java.util.Optional; import org.drools.core.time.impl.TimerJobFactoryManager; import org.drools.core.time.impl.TimerJobInstance; @@ -56,9 +57,15 @@ public interface TimerService extends SchedulerService { * This method may return null for some TimerService implementations that do not want the overhead of maintain this. * @return */ - Collection getTimerJobInstances(long id); + Collection getTimerJobInstances(long kieSessionId); + + default Optional getTimerJobInstanceByTimerId(Long processInstanceId, Long timerId) { + return Optional.empty(); + } void setTimerJobFactoryManager(TimerJobFactoryManager timerJobFactoryManager); TimerJobFactoryManager getTimerJobFactoryManager(); + + }