use of org.activiti.engine.history.ProcessInstanceHistoryLog 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.ProcessInstanceHistoryLog 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.ProcessInstanceHistoryLog 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();
assertThat(events).hasSize(2);
for (HistoricData event : events) {
assertThat(event).isInstanceOf(HistoricVariableInstance.class);
}
}
}
use of org.activiti.engine.history.ProcessInstanceHistoryLog 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();
assertThat(events).hasSize(3);
for (HistoricData event : events) {
assertThat(event).isInstanceOf(HistoricVariableUpdate.class);
}
}
}
use of org.activiti.engine.history.ProcessInstanceHistoryLog 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();
assertThat(events).hasSize(3);
for (HistoricData event : events) {
assertThat(event).isInstanceOf(Comment.class);
}
}
Aggregations