cancel
Showing results for 
Search instead for 
Did you mean: 

multiple email notifications on document library

chrisrichardson
Champ in-the-making
Champ in-the-making
Hi all. I've recently started working with Alfresco (3.4b) but am running into a problem that I can't resolve. I have setup a content rule for anything uploaded into the document library of a space to email the members of the space that there is a new file uploaded/edited etc.

Now the email notification works great only it seems to be sent multiple times. First with the correct file name (using the default email notification template) but them again the same email for the same file only this time the filename can look something like this  12e89be8-d28a-4429-8097-48bd972d8223 and the same goes for the space name. The problem seems to get worse when the email needs to be sent to multiple people.

I'm not sure if I have something configured wrong or if this is just some sort of bug being that I'm running the beta edition. Has anybody else come across this before?
9 REPLIES 9

mrogers
Star Contributor
Star Contributor
It sounds like your email sending is being triggered after every property change.

Sending email is always going to be problematic since it is a non transactional operation in a transactional environment.
Here are some approaches that may help.
    - record the fact that an email has been sent and supress the subsequent emails.
    - send your email post-commit (although there is then a danger that the email may fail)

samnaction
Champ in-the-making
Champ in-the-making
Sorry I am just learning alfresco. How to do that, can you elaborate

chrisrichardson
Champ in-the-making
Champ in-the-making
Thanks mate I'll have a look at that and see how we go.

mthomas
Champ in-the-making
Champ in-the-making
When I set my rules to trigger only when condition "Size cm:content Greater than 0 bytes" I was able to solve this exact problem.

chrisrichardson
Champ in-the-making
Champ in-the-making
thanks mate as I still had this problem outstanding. Am well behind in getting a handle on the whole system but when I try and add the condition I didn't notice anything to do with size. So either I'm looking in the wrong spot or I just don't have a clue (leaning towards the second option).

Any chance you can point me in the right direction?

mthomas
Champ in-the-making
Champ in-the-making
Sure;
1. In Share, Repository browser > folder to apply rules > Manage rules > Edit rule
2. Under Define Rule > When: "Items are created or enter this folder"
3. Check "If all criteria are met::  and select from dropdown  the following "Size in cm:content:"  "Greater Than" type "0"

If Size in cm:content is not in the dropdown go to "Show more…" in the dropdown, find it and add it to the list.

If you are adding this rule to the base "Documents" directory you will need to add:  "unless criteria are met: Name Contains "doclib"  and Name Contains "webpreview"

4. Perform Action "Send email"  Set your parameters here.

5. Check rule applies to subfolders

And Save.

chrisrichardson
Champ in-the-making
Champ in-the-making
Right well I well and truly looking in the wrong spot. I was creating the rules through alfresco and not in share at all (i'll blame my mis-reading an alfresco book for that one). Would a similar principle apply to getting emails for when something is added to a data list? as I get double up emails there as well.

mthomas
Champ in-the-making
Champ in-the-making
For datalists, only run when "items are updated"  And do not "apply rules to subfolders"

Hope that helps!

chrisrichardson
Champ in-the-making
Champ in-the-making
Thanks a lot mate this is going to sort out a few of the problems I've been having. Now to go and impliment it all