11-11-2015 02:50 PM
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseType" value="mysql" />
<property name="dataSource" ref="activitiDataSource" />
<property name="transactionManager" ref="activitiTransactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="history" value="full" />
<property name="jobExecutorActivate" value="false" />
</bean>
<bean id="historyProcessEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseType" value="mysql" />
<property name="dataSource" ref="activitiDataSource" />
<property name="transactionManager" ref="activitiTransactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="history" value="full" />
<property name="jobExecutorActivate" value="false" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>
<bean id="histroyProcessEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="historyProcessEngineConfiguration" />
</bean>
@Autowired
@Qualifier("processEngine")
ProcessEngine processEngine;
@Autowired
@Qualifier("histroyProcessEngine")
ProcessEngine histroyProcessEngine;
Calendar cal = Calendar.getInstance();
cal.set(Calendar.MONTH, Calendar.JANUARY);
histroyProcessEngine.getProcessEngineConfiguration().getClock().setCurrentCalendar(cal);
System.out.println(histroyProcessEngine.getProcessEngineConfiguration().getClock().getCurrentTime().toGMTString());
System.out.println(processEngine.getProcessEngineConfiguration().getClock().getCurrentTime().toGMTString());
11-11-2015 04:00 PM
11-12-2015 10:38 AM
11-12-2015 11:48 AM
11-12-2015 08:52 AM
11-12-2015 09:11 AM
11-12-2015 04:19 PM
DefaultClockImpl
was done to provide exactly the same behaviour as an obsolete timer implementation. I had to propose virtual time handling several years ago when I started crystalball. 🙂 org.activiti.crystalball.simulator.impl.clock.ThreadLocalClock
is used in the simulation runs.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.