private boolean evaluateTrigger(Trigger trigger,Metric metric,BigInteger historyId,Notification notification,EntityManager em,Alert alert){
  Long triggerFiredTime=getTriggerFiredDatapointTime(trigger,metric);
  if (triggerFiredTime != null) {
    sendNotification(trigger,metric,historyId,notification,em,alert,triggerFiredTime);
    return true;
  }
 else {
    String logMessage=MessageFormat.format("The trigger {0} was evaluated against metric {1} and it is not fired for the notification {2}.",trigger.getName(),getMetricExpression(metric),notification.getName());
    _logger.info(logMessage);
    _historyService.appendMessageAndUpdate(historyId,logMessage,null,0,0);
  }
  return false;
}

private boolean evaluateTrigger ( Trigger trigger , Metric metric , BigInteger historyId , Notification notification , EntityManager em , Alert alert ) { Long triggerFiredTime = getTriggerFiredDatapointTime ( trigger , metric ) ; if ( triggerFiredTime != null ) { sendNotification ( trigger , metric , historyId , notification , em , alert , triggerFiredTime ) ; return true ; } else { String logMessage = MessageFormat . format ( "The trigger {0} was evaluated against metric {1} and it is not fired for the notification {2}." , trigger . getName ( ) , getMetricExpression ( metric ) , notification . getName ( ) ) ; _logger . info ( logMessage ) ; _historyService . appendMessageAndUpdate ( historyId , logMessage , null , 0 , 0 ) ; } return false ; }
evaluates the triggering condition .
