use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByNonExistingProcessDefinitionId.
@Test
public void testQueryByNonExistingProcessDefinitionId() {
// given
startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().processDefinitionId("foo").singleResult();
// then
assertNull(log);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByCreationLog.
@Test
public void testQueryByCreationLog() {
// given
ExternalTask task = startExternalTaskProcess();
completeExternalTask(task.getId());
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().creationLog().singleResult();
// then
assertNotNull(log);
assertThat(log.getExternalTaskId(), is(task.getId()));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryById.
@Test
public void testQueryById() {
// given
startExternalTaskProcesses(2);
String logId = retrieveFirstHistoricExternalTaskLog().getId();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().logId(logId).singleResult();
// then
assertNotNull(log);
assertThat(log.getId(), is(logId));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByProcessDefinitionKey.
@Test
public void testQueryByProcessDefinitionKey() {
// given
startExternalTaskProcessGivenProcessDefinitionKey("dummyProcess");
ExternalTask task = startExternalTaskProcessGivenProcessDefinitionKey("Process");
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().processDefinitionKey(task.getProcessDefinitionKey()).singleResult();
// then
assertNotNull(log);
assertThat(log.getExternalTaskId(), is(task.getId()));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByHigherThanOrEqualAPriority.
@Test
public void testQueryByHigherThanOrEqualAPriority() {
// given
startExternalTaskProcesses(5);
// when
List<HistoricExternalTaskLog> externalTaskLogs = historyService.createHistoricExternalTaskLogQuery().priorityHigherThanOrEquals(2L).list();
// then
assertThat(externalTaskLogs.size(), is(3));
for (HistoricExternalTaskLog log : externalTaskLogs) {
assertTrue(log.getPriority() >= 2);
}
}
Aggregations