07-30-2020 11:37 AM
I am using Activiti 5.22.0. I am noticing as of late that we have timer jobs that are no longer firing off. No errors. No Warnings. No logs that I know of saying that they are being ignored or skipped or that there is a problem.
Anyways, if logging is turned up enough, I can see this is the query that the Activiti Engine is doing:
2020-07-29 23:32:04.190 DEBUG 9622 --- [ Thread-6] o.a.e.impl.interceptor.LogInterceptor : --- starting AcquireTimerJobsCmd -------------------------------------------------------- 2020-07-29 23:32:04.190 DEBUG 9622 --- [ Thread-6] o.a.spring.SpringTransactionInterceptor : Running command with propagation REQUIRED 2020-07-29 23:32:04.191 DEBUG 9622 --- [ Thread-6] a.e.i.p.e.J.selectNextTimerJobsToExecute : ==> Preparing: select RES.* from ACT_RU_JOB RES LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_ where (RES.RETRIES_ > 0) and (RES.DUEDATE_ is null or RES.DUEDATE_ <= ?) and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ <= ?) and TYPE_ = 'timer' and ( (RES.EXECUTION_ID_ is null) or (PI.SUSPENSION_STATE_ = 1) ) LIMIT ? OFFSET ? 2020-07-29 23:32:04.191 DEBUG 9622 --- [ Thread-6] a.e.i.p.e.J.selectNextTimerJobsToExecute : ==> Parameters: 2020-07-29 23:32:04.191(Timestamp), 2020-07-29 23:32:04.191(Timestamp), 1(Integer), 0(Integer) 2020-07-29 23:32:04.191 DEBUG 9622 --- [ Thread-6] a.e.i.p.e.J.selectNextTimerJobsToExecute : <== Total: 0 2020-07-29 23:32:04.191 DEBUG 9622 --- [ Thread-6] o.activiti.engine.impl.db.DbSqlSession : flush summary: 0 insert, 0 update, 0 delete. 2020-07-29 23:32:04.191 DEBUG 9622 --- [ Thread-6] o.activiti.engine.impl.db.DbSqlSession : now executing flush... 2020-07-29 23:32:04.192 DEBUG 9622 --- [ Thread-6] o.a.e.impl.interceptor.LogInterceptor : --- AcquireTimerJobsCmd finished -------------------------------------------------------- 2020-07-29 23:32:04.192 DEBUG 9622 --- [ Thread-6] o.a.e.impl.interceptor.LogInterceptor :
Obviously, something has gone wrong with these timers and has caused them to exhaust there retry attempts (ie, most are negative values now due to forced retries). I want to know how I can reset the RETRIES_ amount via the REST API. I know how to retry the timer itself via the REST API, but this does not seem to reset the RETRIES_ amount. Therefore, the timer never automatically fires off again. The only thing I can think of at the moment is to physically delete the timer via the REST API and then restart my Spring Boot Activiti Java process to get the timer recreated hopefully. Is there a proper way to handle this situation?
Explore our Alfresco products with the links below. Use labels to filter content by product module.