AnsweredAssumed Answered

Email Template

Question asked by sylvain78 on Apr 13, 2007

Using the Web Service API, I am subscribing to email notification for a reference.
When I use the parameter 'text' it works fine but doesn't work if I use 'template' as you can see below:

String where = "/app:company_home/cm:testSearchFiles";
Reference reference = new Reference(STORE, null, where);

// Remove all rules
WebServiceFactory.getActionService().removeRules(reference, null);
// Create the action
NamedValue[] parameters = new NamedValue[]{
    new NamedValue("to", new Boolean(false), "", null),
    new NamedValue("subject", new Boolean(false), "Test Alfresco", null),
    new NamedValue("template", new Boolean(false), "workspace://SpacesStore/app:company_home/app:dictionary/app:email_templates/cm:notify_user_email.ftl", null),

Action action = new Action();
action.setTitle("Send an email to specified users.");
action.setDescription("Send an email to specified users.");
// Create the rule
Rule rule = new Rule();
rule.setRuleTypes(new String[]{"inbound"});
rule.setTitle("This rule adds the Send an email to specified users");

// Save the rule
Rule[] saveResults =
           WebServiceFactory.getActionService().saveRules(reference, new Rule[]{rule});

The problem is that I don't get any errors, none in tomcat and nothing interesting with

The problem might come from the template noderef, but before I get to this point I usually had an error using an invalid noderef.

Anyone ran into this problem?