History Cleaning not working. [6.5.0]

I tried two ways to do that:

  1. adding

flowable.enable-history-cleaning=true
flowable.history-cleaning-after-days= 1
flowable.history-cleaning-cycle=0 0 11 ? * MON,TUE,WED,THU,FRI *

to my .properties file and restarted my flowable application. I have about a dozen of process instances that ended more than 24 hours ago. My expectation was that by 11:05 all these finished process instances will be deleted, but I can still see them in my flowable-admin app.

  1. next I tried modifying my @SpringBootApplication class. Here’s how it looks now:

@SpringBootApplication
public class FlowableEventRegistryApplication {
private final RepositoryService repositoryService;
private final EventRepositoryService eventRepositoryService;

public FlowableEventRegistryApplication(RepositoryService repositoryService, EventRepositoryService eventRepositoryService) {
    this.repositoryService = repositoryService;
    this.eventRepositoryService = eventRepositoryService;
}

@Autowired
ProcessEngineConfigurationImpl processEngineConfiguration;

public static void main(String[] args) {
    SpringApplication.run(FlowableEventRegistryApplication.class, args);
}

@PostConstruct
public void init() {
    processEngineConfiguration.setEnableHistoryCleaning(true);
    processEngineConfiguration.setHistoryCleaningTimeCycleConfig("0 30 11 ? * MON,TUE,WED,THU,FRI *");
    processEngineConfiguration.setCleanInstancesEndedAfterNumberOfDays(1);
}

@EventListener(ApplicationStartedEvent.class)
public void started() {}

}

Restarting the application and checking process instances after 11:30 showed that >24hours old instances are still there.

Am I missing something here ? Why don’t they get deleted ?

Both options look ok. If it’s enabled, there should be a timer job being created with a duedate the first time the cron expression would fire. Do you see that timer job through flowable admin?


Yes, there is a timer job. At 12PM 24.09 it created a new one for 12PM 25.09, but the old process instances are still there.