use of org.camunda.bpm.engine.impl.persistence.entity.TimerEntity in project camunda-bpm-platform by camunda.
the class TimerDeclarationImpl method createTimer.
public TimerEntity createTimer(ExecutionEntity execution) {
TimerEntity timer = super.createJobInstance(execution);
scheduleTimer(timer);
return timer;
}
use of org.camunda.bpm.engine.impl.persistence.entity.TimerEntity in project camunda-bpm-platform by camunda.
the class AbstractSetStateCmd method scheduleSuspensionStateUpdate.
protected void scheduleSuspensionStateUpdate(CommandContext commandContext) {
TimerEntity timer = new TimerEntity();
JobHandlerConfiguration jobHandlerConfiguration = getJobHandlerConfiguration();
timer.setDuedate(executionDate);
timer.setJobHandlerType(getDelayedExecutionJobHandlerType());
timer.setJobHandlerConfigurationRaw(jobHandlerConfiguration.toCanonicalString());
commandContext.getJobManager().schedule(timer);
}
use of org.camunda.bpm.engine.impl.persistence.entity.TimerEntity in project camunda-bpm-platform by camunda.
the class InputOutputEventTest method testTimerCatchEvent.
@Deployment
public void testTimerCatchEvent() {
Map<String, Object> variables = new HashMap<String, Object>();
Date dueDate = DateTimeUtil.now().plusMinutes(5).toDate();
variables.put("outerVariable", new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(dueDate));
runtimeService.startProcessInstanceByKey("testProcess", variables);
Job job = managementService.createJobQuery().singleResult();
TimerEntity timer = (TimerEntity) job;
assertDateEquals(dueDate, timer.getDuedate());
}
Aggregations