use of org.activiti.engine.history.ProcessInstanceHistoryLog in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testBaseProperties.
public void testBaseProperties() {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).singleResult();
assertNotNull(log.getId());
assertNotNull(log.getProcessDefinitionId());
assertNotNull(log.getStartActivityId());
assertNotNull(log.getDurationInMillis());
assertNotNull(log.getEndTime());
assertNotNull(log.getStartTime());
}
use of org.activiti.engine.history.ProcessInstanceHistoryLog in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testIncludeTasksandComments.
public void testIncludeTasksandComments() {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeTasks().includeComments().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(5, events.size());
for (int i = 0; i < 5; i++) {
HistoricData event = events.get(i);
if (i < 2) {
// tasks are created before comments
assertTrue(event instanceof HistoricTaskInstance);
} else {
assertTrue(event instanceof Comment);
}
}
}
use of org.activiti.engine.history.ProcessInstanceHistoryLog in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testEverything.
public void testEverything() {
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.FULL)) {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeTasks().includeActivities().includeComments().includeVariables().includeVariableUpdates().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(15, events.size());
}
}
use of org.activiti.engine.history.ProcessInstanceHistoryLog in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testIncludeTasks.
public void testIncludeTasks() {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeTasks().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(2, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof HistoricTaskInstance);
}
}
use of org.activiti.engine.history.ProcessInstanceHistoryLog in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testIncludeActivities.
public void testIncludeActivities() {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeActivities().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(5, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof HistoricActivityInstance);
}
}
Aggregations