Task timestamps start claim end are same

We are using Flowable version: 6.5.0 ,

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.

  • start_time_
  • claim_time_
  • end_time_

Any help would be helpfull

got this fixed by implementing the custom clock…

references

Could you expand on that? Normally this wouldn’t be needed.

@joram

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

Here is my custom process engine config

	@Bean(name = "processEngine")
	public ProcessEngine getProcessEngine(SpringProcessEngineConfiguration spec) {
		
		spec.setIdGenerator(new DbIdGenerator());
		spec.setEngineName("FLOWABLE-BOOT");
		spec.setDatabaseSchemaUpdate(Boolean.TRUE.toString());
		spec.setEnableLogSqlExecutionTime(false);
		spec.setEnableDatabaseEventLogging(false);
		spec.setAsyncHistoryEnabled(false);
		spec.setAsyncHistoryExecutorActivate(false);
		spec.setEventListeners(Arrays.<FlowableEventListener>asList(new FlowableEventHandler()));
		spec.setClock(new FlowableClock());
		return  spec.buildProcessEngine();
	}

FlowableClock → is exact same code from DefaultClock with the exception of
getCurrentTime() → returns → new Date()

application.yml

flowable:
  datasource:
    username: flowable
    password: password
    url: jdbc:postgresql://localhost:5432/flowable
    driver-class-name: org.postgresql.Driver
    connection-timeout: 60000
    connection-test-query: SELECT 1
    pool-name: flowable-db-pool
    maximum-pool-size: 15
    minimum-idle: 5
    max-lifetime: 60001
    idle-timeout: 60002
  database-schema: public
  database-schema-update: false
  
  async-executor-activate: false
  check-process-definitions: false
  cmmn.async-executor-activate: false
  cmmn.enabled: false
  content.enabled: false
  db-history-used: true
  dmn.deploy-resources: false
  dmn.enabled: false
  form.deploy-resources: false
  form.enabled: false
  history-level: audit    # none , activity , audit, full
  idm.enabled: true
  process.async-executor-activate: false
  rest.app.cors.enabled: false
  eventregistry.enabled: false
  app.enabled: true
  app.deploy-resources: false