if (event instanceof RunEvent) {
RunEvent re = (RunEvent)event;
Run r = re.getEventObject();
for (User user : r.getWatchers()) {
Alert a = new DefaultAlert(user);
a.setAlertLevel(AlertLevel.CRITICAL);
a.setAlertTitle("Run Failed: " + r.getAlias());
a.setAlertText("The following Run has been set to FAILED: "+r.getAlias()+" ("+event.getEventMessage()+"). Please view Run " +r.getId()+ " in MISO for more information");
for (AlerterService as : alerterServices) {
try {
as.raiseAlert(a);
}