06-26-2015 10:36 AM
org.activiti.engine.test.bpmn.event.timer.StartTimerEventTest#testCycleWithLimitStartTimerEvent_failing
https://github.com/martin-grofcik/Activiti/tree/timer-issue06-26-2015 10:38 AM
06-30-2015 05:21 PM
07-01-2015 06:15 AM
repetition timer is executed n timesthat's not true, there is guarantee of n times execution.
repetition timer period will be constant for all repetitions.There is still issue in it. I updated source code in my branch:
@Deployment(resources = {"org/activiti/engine/test/bpmn/event/timer/StartTimerEventTest.testCycleWithLimitStartTimerEvent.bpmn20.xml"})
public void testCycleWithLimitStartTimerEvent_keepTimerPeriod() throws Exception {
processEngineConfiguration.getClock().setCurrentTime(new Date());
final ProcessInstanceQuery piq = runtimeService.createProcessInstanceQuery().processDefinitionKey("startTimerEventExampleCycle");
// move to 15 mins forward - e.g. server was down and it was started again
moveByMinutes(15);
waitForJobExecutorOnCondition(10000, 500, new Callable<Boolean>() {
public Boolean call() throws Exception {
// one process instance should be started - because time is after start date
return 1 == piq.count();
}
});
moveByMinutes(1);
waitForJobExecutorOnCondition(10000, 500, new Callable<Boolean>() {
public Boolean call() throws Exception {
// we have moved the time 1 minute forward. Process start period is 5 mins. => No other process instance
// should be started
// @FIXME: 5.18-SNAPSHOT - there are 2 process instances running because of org.activiti.engine.impl.calendar.DurationHelper.getDateAfterRepeat
return 1 == piq.count();
}
});
// +4 mins -> new process instance should be started because time period was reached since the last timer execution
moveByMinutes(4);
waitForJobExecutorOnCondition(10000, 500, new Callable<Boolean>() {
public Boolean call() throws Exception {
return 2 == piq.count();
}
});
}
07-02-2015 04:47 AM
07-03-2015 01:37 AM
07-03-2015 05:17 AM
07-06-2015 04:47 AM
* The timer is moved by 64 seconds. Time is now 11:11:57
* The timer is moved 1 second. Time was now 11:12:03
Oh-oh. That is exact T + (4 * 1minute). The job executor inspects the start time and sees it should fire NOW.
07-06-2015 09:07 AM
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.