try{
statement = connection.prepareStatement(ExperimentBuilderConstants.MONITORING_SQL);
statement.setString(1, "%" + workflowID + "%");
results = statement.executeQuery();
while (results.next()) {
Notification notif = new Notification();
notif.setWorkflowId(results.getString("templateId"));
notif.setTemplateId(results.getString("templateId"));
notif.setStatus(results.getString("status"));
long startTime = results.getLong("startTime");
if(startTime != 0){
notif.setStartTime(new Date(startTime));
}
long endTime = results.getLong("endTime");
if(endTime != 0){
notif.setEndTime(new Date(endTime));
}
notifs.add(notif);
}
} catch (Exception e) {
log.error("Failed to query for experiment (notifications)" + e.getMessage(), e);