Halo, boys.
I want to query some active processInstances and tasks info. I found that these have same startTime.
flowable.cfg.xml
<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="url" value=..... />
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="username" value=..... />
<property name="password" value=..... />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.flowable.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="asyncExecutorActivate" value="false" />
<property name="deploymentResources"
value="classpath*:META-INF/*.bpmn20.xml" />
</bean>
<bean id="processEngine" class="org.flowable.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
start process:
public void startAuditingProcessByProcessID(String processId) {
runtimeService.startProcessInstanceByKey(processId);
}
However ,
I found that using these code will work well. (each process (or task) startTime are diff )
processEngineConfiguration.getClock().setCurrentTime(null);
any solution for this case? I didn’t add any clock to inject into processEngineConfiguration .
- Project:
Springboot 1.4.2+ flowable 6.4 + mysql 5.+
`
Thx a lot.