Dear Flowable experts,
While playing around with SharedExecutorServiceAsyncExecutor
, I have stumbled across a suspicious behavior: even though the executor is started, background activities are not executed.
A deeper investigation showed the following implementation of the SharedExecutorServiceAsyncExecutor#start
method:
for (String tenantId : timerJobAcquisitionRunnables.keySet()) {
startTimerJobAcquisitionForTenant(tenantId);
startAsyncJobAcquisitionForTenant(tenantId);
startResetExpiredJobsForTenant(tenantId);
}
It somehow functionally differs from that of its parent (AbstractAsyncExecutor). Combining them into a overridden implementation as follows solves the problem:
super.start();
if (isActive) {
return;
}
isActive = true;
log.info(“Starting up the async job executor [{}].”, getClass().getName());
initializeJobEntityManager();
initializeRunnables();
startAdditionalComponents();
executeTemporaryJobs();
Is it anyhow an inconsistency in the code or is it rather me using the executor in an unorthodox way?
Thank you!
Best wishes,
Vasil