}
}
logger.info("Matched notification #" + cfg.getId() + " for process state change #" + pi.getInternalId());
List<String> emailsToNotify = new LinkedList<String>();
if (task != null && cfg.isNotifyTaskAssignee()) {
UserData owner = task.getOwner();
if (cfg.isSkipNotificationWhenTriggeredByAssignee() &&
owner != null &&
owner.getLogin() != null &&
owner.getLogin().equals(userData.getLogin())) {
logger.info("Not notifying user " + owner.getLogin() + " - this user has initiated processed action");
continue;
}
if (owner != null && hasText(owner.getEmail())) {
emailsToNotify.add(owner.getEmail());
logger.info("Notification will be sent to " + owner.getEmail());
}
}
if (hasText(cfg.getNotifyEmailAddresses())) {
emailsToNotify.addAll(Arrays.asList(cfg.getNotifyEmailAddresses().split(",")));
}