// Récupérer le nom du site
var parent = document.getParent();
var shortName= parent.getSiteShortName();
var leSite = siteService.getSite(shortName);
// On récupère les membres du site
var membres = leSite.listMembers(null,null,0);
var nomDuSite = leSite.title;
var membre;
for (membre in membres){
var donneesMembres = people.getPerson(membre);
var email = donneesMembres.properties.email;
if(email){
if (donneesMembres.properties.userName!="admin") {
if ((document.type != "{http://www.alfresco.org/model/content/1.0}thumbnail") && (document.typeShort== "cm:content")){
// create mail action
var mail = actions.create("mail");
mail.parameters.to = email;
mail.parameters.subject = "Un nouveau document vient d'être ajouté sur'"+nomDuSite+"'…";
mail.parameters.from = "admin@alfresco.fr";
mail.parameters.template = companyhome.childByNamePath("Dictionnaire de données/Modèles d'e-mail/Modèles d'e-mail de notification/notify_user_email.ftl");
mail.parameters.text = "Un document est ajouté dans l'espace documentaire !" ;
// execute l'action
mail.execute(document);
}
}
}
}
avez vous une idée de ce que je dois faire pour comparer un membre avec le owner????
// envoyer un mail lorsqu'une personne ajoute un sujet sur le forum
// Récupérer le nom du site
// (donneesMembres.properties.userName!="admin") test si on ne veut pas envoyer à l'admin
var parent = document.getParent();
var shortName= parent.getSiteShortName();
var leSite = siteService.getSite(shortName);
// On récupère les membres du site
var membres = leSite.listMembers(null,null,0);
var nomDuSite = leSite.title;
var membre;
// on envoie un message à chaque memebre
for (membre in membres){
var donneesMembres = people.getPerson(membre);
var email = donneesMembres.properties.email;
if(email){
//le mail ne doit être envoyé ni aux invités, ni à celui qui a envoyé déposé le document
if ((donneesMembres.properties.userName!="guest") && (donneesMembres.properties.userName!=person.properties.userName)) {
if ((document.type != "{http://www.alfresco.org/model/content/1.0}thumbnail") && (document.typeShort== "cm:content")){
// create mail action
var mail = actions.create("mail");
mail.parameters.to = email;
mail.parameters.subject = "Ajout de topic sur'"+nomDuSite+"'…";
mail.parameters.from = "admin@grandangle.fr.logica.com";
mail.parameters.template = companyhome.childByNamePath("Dictionnaire de données/Modèles d'e-mail/Modèles d'e-mail de notification/notify_user_email_french.ftl");
mail.parameters.text = " Bonjour,\n Un nouveau sujet vient d'\352tre ajout\351 dans le forum de la '"+nomDuSite+"' par \n \n Cordialement, \n L'administrateur '"+nomDuSite+"'";
// execute l'action
mail.execute(document);
}
}
}
}
14:47:40,130 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080007 Wrapped Exception (with status template): 07080108 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080107 Content conversion failed:
14:47:40,312 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080008 Wrapped Exception (with status template): 07080111 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080110 Content conversion failed:
14:47:44,356 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080009 Wrapped Exception (with status template): 07080116 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080115 Content conversion failed:
14:47:44,482 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080010 Wrapped Exception (with status template): 07080119 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080118 Content conversion failed:
14:47:49,163 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080011 Wrapped Exception (with status template): 07080122 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080121 Content conversion failed:
14:47:49,376 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080012 Wrapped Exception (with status template): 07080125 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080124 Content conversion failed:
14:47:52,823 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080013 Wrapped Exception (with status template): 07080130 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080129 Content conversion failed:
14:47:52,999 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07080014 Wrapped Exception (with status template): 07080133 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/repository/thumbnail/thumbnail.get.js': 07080132 Content conversion failed:
WARNINGS 14:47:44,501 http-8080-39 WARN [webscripts.connector.RemoteClient] Exception during close() of HTTP API connection
14:47:49,388 http-8080-18 WARN [webscripts.connector.RemoteClient] Exception during close() of HTTP API connection
Au niveau de share, il me dit bien que la règle a été exécutée, cependant je ne reçois jamais de mail et c'est toujours la même erreur de HTTP API et de thumbnail.jsContent from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.