History Cleaning not working in Flowable v6.5.0 with Spring boot 1.5.14

After following these docs for enabling History Cleaning, we tried to run a flowable engine but nothing happened. Logs also didn’t show any indication of running history cleaning jobs or reported any exception while executing it.

I tried to look into the code of Flowable and found that after enabling history cleaning, HandleHistoryCleanupTimerJobCmd.execute(CommandContext) runs while booting up the application but nothing happens after that.

These are the properties I’ve set in application.properties:

flowable.history-cleaning-cycle=0 * * ? * * #to run every minute for testing

After no luck with the above properties, I tried to use the Manual configuration also to test the history deletion but it didn’t work too.

Is there something else we need to change/enable also to make the History Cleaning work?

I wrote the docs and spring properties integration. though not the features. Setting flowable.enable-history-cleaning=true should be sufficient to enable it. The settings that you have should remove any historic process and related data that ended more than 50 days ago. Are you certain you have historic process that old? I’ll try to replicate your setup sometime this evening and see what I can find.

Thanks for the response and looking into this issue wwitt,
Yes, I have processes that are 1 year and 8 months old. How can I validate that the job of History Cleaning is executing, and was it successful or not? does it generate any logs for debugging?

Looking at the source, it doesn’t look like we do much logging. Here is the test we use to test history cleanup. For you purposes, you might try configuring SQL logging


You can clean up the history in spring-boot by setting those 3 properties in ProcessEngineConfigurationImpl class.

I have fixed this by setting values for these properties on startup of application.

import javax.annotation.PostConstruct;

import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

public class FlowableApplication {

ProcessEngineConfigurationImpl processEngineConfiguration;

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

  public void init() {
     	processEngineConfiguration.setHistoryCleaningTimeCycleConfig("0 * * ? * *");


Wanted to check on below scenario how does the history clean up gets executed

Scenario 1:

  1. Main Process -> Call activity (Completed) -> User Task 1( Completed )-> End Call activity-> User Task 2 (Active in Main Process)

Scenario 2:

  1. Main Process -> Call activity (Completed) -> User Task 1( Completed )->User Task 3 (Active)