Search in sources :

Example 41 with HistoricExternalTaskLogQuery

use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.

the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByWorkerIdAsc.

@Test
public void testQuerySortingByWorkerIdAsc() {
    // given
    int taskCount = 10;
    List<ExternalTask> list = startProcesses(taskCount);
    completeExternalTasksWithWorkers(list);
    // when
    HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
    query.successLog().orderByWorkerId().asc();
    // then
    verifyQueryWithOrdering(query, taskCount, historicExternalTaskLogByWorkerId());
}
Also used : HistoricExternalTaskLogQuery(org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery) ExternalTask(org.camunda.bpm.engine.externaltask.ExternalTask) LockedExternalTask(org.camunda.bpm.engine.externaltask.LockedExternalTask) Test(org.junit.Test)

Example 42 with HistoricExternalTaskLogQuery

use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.

the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByTaskIdDsc.

@Test
public void testQuerySortingByTaskIdDsc() {
    // given
    int taskCount = 10;
    startProcesses(taskCount);
    // when
    HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
    query.orderByExternalTaskId().desc();
    // then
    verifyQueryWithOrdering(query, taskCount, inverted(historicExternalTaskLogByExternalTaskId()));
}
Also used : HistoricExternalTaskLogQuery(org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery) Test(org.junit.Test)

Example 43 with HistoricExternalTaskLogQuery

use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.

the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByProcessDefinitionKeyAsc.

@Test
public void testQuerySortingByProcessDefinitionKeyAsc() {
    // given
    int taskCount = 10;
    startProcessesByProcessDefinitionKey(taskCount);
    // when
    HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
    query.orderByProcessDefinitionKey().asc();
    // then
    verifyQueryWithOrdering(query, taskCount, historicExternalTaskLogByProcessDefinitionKey(engineRule.getProcessEngine()));
}
Also used : HistoricExternalTaskLogQuery(org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery) Test(org.junit.Test)

Example 44 with HistoricExternalTaskLogQuery

use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.

the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByTimestampAsc.

@Test
public void testQuerySortingByTimestampAsc() {
    // given
    int taskCount = 10;
    startProcesses(taskCount);
    // when
    HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
    query.orderByTimestamp().asc();
    // then
    verifyQueryWithOrdering(query, taskCount, historicExternalTaskByTimestamp());
}
Also used : HistoricExternalTaskLogQuery(org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery) Test(org.junit.Test)

Aggregations

HistoricExternalTaskLogQuery (org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery)44 Test (org.junit.Test)33 ExternalTask (org.camunda.bpm.engine.externaltask.ExternalTask)4 LockedExternalTask (org.camunda.bpm.engine.externaltask.LockedExternalTask)4 HistoricExternalTaskLog (org.camunda.bpm.engine.history.HistoricExternalTaskLog)2 ArrayList (java.util.ArrayList)1 AbstractRestServiceTest (org.camunda.bpm.engine.rest.AbstractRestServiceTest)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 HistoricExternalTaskLogDto (org.camunda.bpm.engine.rest.dto.history.HistoricExternalTaskLogDto)1 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)1