cancel
Showing results for 
Search instead for 
Did you mean: 

Rule that will send email when Document Library is updated

xzibit12
Champ in-the-making
Champ in-the-making
I created a rule that will send email when Document Library is updated. My rule is running active and applied to subfolders and it should triggers when items are created or enter this folder, updated or deleted and if criteria is met it will send an email to my account. I do not receive a notification immediately, does it have to do with the activities.feed.notifier.repeatIntervalMins=(no of minutes) on the alfresco.global.properties file? And also the template I set on my rule is notify_user_email.html.ftl with a subject of "New File Updated" which is different from what I received. The subject of email notification I received is Alfresco Share: Recent Activities which made me think that my rule is not working correctly.
5 REPLIES 5

jpotts
World-Class Innovator
World-Class Innovator
That "Share activities" email is automatically generated. I suspect your rule is either not firing at all or it is firing but failing to send the notification. You might try debugging the MailActionExecuter class.

Jeff

stevevillardi
Champ in-the-making
Champ in-the-making
should this rule work if a file is added via ftp?

jpotts
World-Class Innovator
World-Class Innovator
Rules should always fire, regardless of how the object is added to the folder.

Jeff

srinivasmurty
Champ in-the-making
Champ in-the-making
How do I go about debugging MailActionExecutor class? Sorry for sounding like a newb, but I am not familiar with how this can be done.

–Srini Murty

jpotts
World-Class Innovator
World-Class Innovator
1. Make sure you've downloaded the Alfresco SDK for the version you are working with.
2. Import the Eclipse projects that come with the SDK into your Eclipse workspace.
3. Associate the source zips that are delivered in the SDK with each of the Alfresco JARs.
4. On your local machine, set environment variables that Java and Tomcat need for remote debugging. Those environment variables are:
JPDA_ADDRESS=8000
JPDA_TRANSPORT=dt_socket
5. Modify $TOMCAT_HOME/bin/startup.sh as follows:
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"
6. Start tomcat. You should see something like:
Listening for transport dt_socket at address: 8000
7. Back in Eclipse, go to Debug Configurations, Remote Java Application and click New.
8. Select your project, host as localhost, port as 8000
9. Click Debug
10. Open the MailActionExecutor class. If you associated the source correctly, you should see the source when you open the class. Find a good spot for a breakpoint. Set the breakpoint by double-clicking in the left-hand margin of the code editor. You should see a little sphere that turns into a checkmark when the debugger is running and the class is loaded properly. If you ever set a breakpoint that doesn't turn into a checkmark it means Tomcat hasn't loaded your class or the debugger isn't running or doesn't know about your class or something like that.

Now do something to trigger the mail action and Eclipse should open up the debugger perspective. Now you're stepping through Alfresco's code and reaping the full benefit of developing on an open source platform!

Jeff