AuditLogService logService = new JPAAuditLogService(getEmf());
List<VariableInstanceLog> vils = logService.findVariableInstances(procInstId);
assertTrue( "No variable instance logs found", vils != null && ! vils.isEmpty() );
assertTrue( "Too few variable instance logs found: " + vils.size(), vils.size() >= 3 );
VariableInstanceLog lastVil = null;
for( VariableInstanceLog vil : vils ) {
if( ! vil.getVariableId().equals("inputStr") ) {
continue;
}
if( lastVil == null ) {
lastVil = vil;
}
if( lastVil.getId() < vil.getId() ) {
lastVil = vil;
}
}
assertTrue( lastVil.getVariableId() + ": " + lastVil.getValue(),
lastVil.getValue().contains("check") || lastVil.getVariableId().equals("otherStr") );
}