use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByNonExistingActivityIds.
@Test
public void testQueryByNonExistingActivityIds() {
// given
startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().activityIdIn("foo").singleResult();
// then
assertNull(log);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByActivityInstanceIds.
@Test
public void testQueryByActivityInstanceIds() {
// given
startExternalTaskProcessGivenActivityId("dummyName");
ExternalTask task = startExternalTaskProcess();
String activityInstanceId = historyService.createHistoricActivityInstanceQuery().activityId(DEFAULT_EXTERNAL_TASK_NAME).singleResult().getId();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().activityInstanceIdIn(activityInstanceId).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 testQueryByFailureLog.
@Test
public void testQueryByFailureLog() {
// given
ExternalTask task = startExternalTaskProcess();
reportExternalTaskFailure(task.getId(), "Dummy error message!");
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().failureLog().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 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.history.HistoricExternalTaskLog in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByNonExistingProcessInstanceId.
@Test
public void testQueryByNonExistingProcessInstanceId() {
// given
startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().processInstanceId("foo").singleResult();
// then
assertNull(log);
}
Aggregations