use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class ExternalTaskParseTest method testParseExternalTaskWithExpressionTopic.
@Deployment
public void testParseExternalTaskWithExpressionTopic() {
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("topicName", "testTopicExpression");
runtimeService.startProcessInstanceByKey("oneExternalTaskWithExpressionTopicProcess", variables);
ExternalTask task = externalTaskService.createExternalTaskQuery().singleResult();
assertEquals("testTopicExpression", task.getTopicName());
}
use of org.camunda.bpm.engine.externaltask.ExternalTask in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogQueryTest method testQueryByDeletionLog.
@Test
public void testQueryByDeletionLog() {
// given
ExternalTask task = startExternalTaskProcess();
runtimeService.deleteProcessInstance(task.getProcessInstanceId(), null);
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().deletionLog().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 testQuery.
@Test
public void testQuery() {
// given
ExternalTask task = startExternalTaskProcess();
// when
HistoricExternalTaskLog log = historyService.createHistoricExternalTaskLogQuery().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 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.externaltask.ExternalTask 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()));
}
Aggregations