use of org.activiti.engine.history.HistoricData in project Activiti by Activiti.
the class ProcessInstanceLogQueryAndByteArrayTypeVariableTest method testIncludeVariableUpdates.
public void testIncludeVariableUpdates() {
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.FULL)) {
HistoricVariableInstance historicVariableInstance = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).variableName("var").singleResult();
assertEquals(historicVariableInstance.getValue(), LARGE_STRING_VALUE);
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeVariableUpdates().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(1, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof HistoricVariableUpdate);
assertEquals(((HistoricDetailVariableInstanceUpdateEntity) event).getValue(), LARGE_STRING_VALUE);
}
}
}
use of org.activiti.engine.history.HistoricData in project Activiti by Activiti.
the class ProcessInstanceLogQueryAndByteArrayTypeVariableTest method testIncludeVariables.
public void testIncludeVariables() {
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.FULL)) {
HistoricVariableInstance historicVariableInstance = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).variableName("var").singleResult();
assertEquals(historicVariableInstance.getValue(), LARGE_STRING_VALUE);
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeVariables().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(1, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof HistoricVariableInstance);
assertEquals(((HistoricVariableInstanceEntity) event).getValue(), LARGE_STRING_VALUE);
}
}
}
use of org.activiti.engine.history.HistoricData in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testIncludeVariableUpdates.
public void testIncludeVariableUpdates() {
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.FULL)) {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeVariableUpdates().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(3, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof HistoricVariableUpdate);
}
}
}
use of org.activiti.engine.history.HistoricData in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testIncludeVariables.
public void testIncludeVariables() {
if (processEngineConfiguration.getHistoryLevel().isAtLeast(HistoryLevel.FULL)) {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeVariables().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(2, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof HistoricVariableInstance);
}
}
}
use of org.activiti.engine.history.HistoricData in project Activiti by Activiti.
the class ProcessInstanceLogQueryTest method testIncludeComments.
public void testIncludeComments() {
ProcessInstanceHistoryLog log = historyService.createProcessInstanceHistoryLogQuery(processInstanceId).includeComments().singleResult();
List<HistoricData> events = log.getHistoricData();
assertEquals(3, events.size());
for (HistoricData event : events) {
assertTrue(event instanceof Comment);
}
}
Aggregations