We recently converted from standalone flowable springmvc to springboot version 2.6.6, without changing the flowable version
Technically no change in the flowable version.
Since this change, the server startup timestamp is being used for all the task start time, claim time & end time in both ACT_RU_TASK AND ACT_HI_TASKINST.
No matter when the task is created claimed, or completed below three properties are always set to the server start timestamp.
There is nothing special in the application, it’s just a spring boot app.
For whatever reason, the server startup timestamp is used in all date fields in the process instance creation all the way to completion.
My guess would be the “CURRENT_TIME” variable in DefaultClock is not being reset as needed, the only change I did was to call reset() so it returns a new Date for the current timestamp…
Everything just worked after this change.
Actual DefaultClock.getCurrentTime()
@Override
public Date getCurrentTime() {
return CURRENT_TIME == null ? new Date() : CURRENT_TIME.getTime();
}
Modified Clock
@Override
public Date getCurrentTime() {
reset();
return CURRENT_TIME == null ? new Date() : CURRENT_TIME.getTime();
}
Below are the completed project details with the config
Using flowable-spring-boot-starter version 6.5.0
Java 1.8
@kdevineni the only way that the CURRENT_TIME is set is if you are manually setting the time on the clock, by default the CURRENT_TIME is always null for flowable. Therefore, I would suggest you to look into your application and find where you are invoking Clock#setCurrentTime and Clock#setCurrentCalendar.