use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByRetriesAsc.
@Test
public void testQuerySortingByRetriesAsc() {
// given
int taskCount = 10;
List<ExternalTask> list = startProcesses(taskCount);
reportExternalTaskFailure(list);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
query.failureLog().orderByRetries().asc();
// then
verifyQueryWithOrdering(query, taskCount, historicExternalTaskLogByRetries());
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByWorkerIdDsc.
@Test
public void testQuerySortingByWorkerIdDsc() {
// given
int taskCount = 10;
List<ExternalTask> list = startProcesses(taskCount);
completeExternalTasksWithWorkers(list);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
query.successLog().orderByWorkerId().desc();
// then
verifyQueryWithOrdering(query, taskCount, inverted(historicExternalTaskLogByWorkerId()));
}
use of org.camunda.bpm.engine.externaltask.ExternalTask 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());
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogTest method testHistoricExternalTaskLogFailedProperties.
@Test
public void testHistoricExternalTaskLogFailedProperties() {
// given
ExternalTask task = startExternalTaskProcess();
reportExternalTaskFailure(task.getId());
task = externalTaskService.createExternalTaskQuery().singleResult();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().failureLog().singleResult();
// then
assertHistoricLogPropertiesAreProperlySet(task, log);
assertEquals(WORKER_ID, log.getWorkerId());
assertLogIsInFailedState(log);
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogTest method testErrorDetails.
@Test
public void testErrorDetails() {
// given
ExternalTask task = startExternalTaskProcess();
reportExternalTaskFailure(task.getId());
// when
String failedHistoricExternalTaskLogId = historyService.createHistoricExternalTaskLogQuery().failureLog().singleResult().getId();
// then
String stacktrace = historyService.getHistoricExternalTaskLogErrorDetails(failedHistoricExternalTaskLogId);
assertNotNull(stacktrace);
assertEquals(ERROR_DETAILS, stacktrace);
}
Aggregations