use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByTopicName.
@Test
public void testQueryByTopicName() {
// given
String dummyTopic = "dummy";
startExternalTaskProcessGivenTopicName(dummyTopic);
ExternalTask task = startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().topicName(DEFAULT_TOPIC).singleResult();
// then
assertNotNull(log);
assertThat(log.getExternalTaskId(), is(task.getId()));
}
use of org.camunda.bpm.engine.externaltask.ExternalTask 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()));
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByNonExistingWorkerId.
@Test
public void testQueryByNonExistingWorkerId() {
// given
ExternalTask task = startExternalTaskProcess();
completeExternalTask(task.getId());
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().workerId("foo").singleResult();
// then
assertNull(log);
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryBySuccessLog.
@Test
public void testQueryBySuccessLog() {
// given
ExternalTask task = startExternalTaskProcess();
completeExternalTask(task.getId());
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().successLog().singleResult();
// then
assertNotNull(log);
assertThat(log.getExternalTaskId(), is(task.getId()));
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQuerySortingTest method testQuerySortingByRetriesDsc.
@Test
public void testQuerySortingByRetriesDsc() {
// given
int taskCount = 10;
List<ExternalTask> list = startProcesses(taskCount);
reportExternalTaskFailure(list);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
query.failureLog().orderByRetries().desc();
// then
verifyQueryWithOrdering(query, taskCount, inverted(historicExternalTaskLogByRetries()));
}
Aggregations