use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByPriorityRange.
@Test
public void testQueryByPriorityRange() {
// given
startExternalTaskProcesses(5);
// when
List<HistoricExternalTaskLog> externalTaskLogs = historyService.createHistoricExternalTaskLogQuery().priorityLowerThanOrEquals(3L).priorityHigherThanOrEquals(1L).list();
// then
assertThat(externalTaskLogs.size(), is(3));
for (HistoricExternalTaskLog log : externalTaskLogs) {
assertTrue(log.getPriority() <= 3 && log.getPriority() >= 1);
}
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByLowerThanOrEqualAPriority.
@Test
public void testQueryByLowerThanOrEqualAPriority() {
// given
startExternalTaskProcesses(5);
// when
List<HistoricExternalTaskLog> externalTaskLogs = historyService.createHistoricExternalTaskLogQuery().priorityLowerThanOrEquals(2L).list();
// then
assertThat(externalTaskLogs.size(), is(3));
for (HistoricExternalTaskLog log : externalTaskLogs) {
assertTrue(log.getPriority() <= 2);
}
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByNonExistingErrorMessage.
@Test
public void testQueryByNonExistingErrorMessage() {
// given
startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().errorMessage("asdfasdf").singleResult();
// then
assertNull(log);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByNonExistingProcessDefinitionKey.
@Test
public void testQueryByNonExistingProcessDefinitionKey() {
// given
startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().processDefinitionKey("foo").singleResult();
// then
assertNull(log);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByActivityId.
@Test
public void testQueryByActivityId() {
// given
startExternalTaskProcessGivenActivityId("dummyName");
ExternalTask task = startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().activityIdIn(DEFAULT_EXTERNAL_TASK_NAME).singleResult();
// then
assertNotNull(log);
assertThat(log.getExternalTaskId(), is(task.getId()));
}
Aggregations