cancel
Showing results for 
Search instead for 
Did you mean: 

E-mail notification

pascalh
Champ in-the-making
Champ in-the-making
Hello there!

I've got another request today please!
In the web client, when a document has to be approved or rejected by a person, I would like to send an e-mail to the creator of this document to notify him of the state of the review! How can I possibly do that? The most difficult part for me in using Alfresco is that I do not understand where to change the code and how to integrate it in order to be able to apply and see the changes. I know that I have to stop the tomcat server, make my modifications by importing my changes and then restart the server, log on in to http://localhost:8080/alfresco. However, I still do not see what changes I've got to do, since I did not find a real good explanation (like a howto guide showing step by step what to do)…

Thanks a lot! And sorry if I seem a bit silly :-s
Bye!

Pascal
12 REPLIES 12

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
you can create custom workflow, where you define who are going to be notified.

you can edit alfresco\WEB-INF\classes\alfresco\workflow files here, end get what you need. simply typing some js, or you can create you own.

i hope this. helps.

pascalh
Champ in-the-making
Champ in-the-making
First, thanks for your reply!

Well, after looking at the content of alfresco\WEB-INF\classes\alfresco\workflow, I noticed that there are some xml files. I suppose that I have to modify "review_processdefinition.xml", which I assume is linked to the approve/reject process. I want to send it once the workflow 'Review&process' is assigned to one person, and when the designated person approve or reject the document too…To do so, I've got to pick up the "from" and "to" fields and send the message correctly.
I found the following code in "invitation-nominated_processdefinition.xml" :

         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
    ...
















































































I think I've got to do something like in bold letters, right or wrong? Otherwise, how can I possibly handle this easily?

Thanks in advance if anybody could help! Sorry again if it may seem too basic, I'm a rookie 🙂


Pascal

norgan
Champ in-the-making
Champ in-the-making
Hi pascal,
you will have to get into advanced workflows more deeply to do that. Alternately, you can evaluate the "execute javascript from a business rule" path and use the highlighted code as example how to send mail via javascript.

See the link in my signature for a tutorial on advanced workflows.

pascalh
Champ in-the-making
Champ in-the-making
Hello Norgan!

What do you mean by :
evaluate the "execute javascript from a business rule" path and use the highlighted code as example how to send mail via javascript.
? Is it a reference to a special tutorial? If so, which one is it? I didn't get it, sorry :-s


Pascal

norgan
Champ in-the-making
Champ in-the-making
It meas, you might think abot creating a business rule to execute some js script and put the code in, you listed before - sorry for the flowery version first Smiley Happy

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
I would advice you to buy alfresco developer guide for this, you will be able to develop skills for this .

pascalh
Champ in-the-making
Champ in-the-making
Thanks Norgan! But it still remains unclear to me sorry. I'm gonna try to seek for some information on the web.

About the Alfresco developer guide, I'm thinking about it. I'm working in a company and people there would like to deploy Alfresco as part of one project. I'm gonna recommend them this book.

Thanks again!

Pascal

pascalh
Champ in-the-making
Champ in-the-making
Well, I've got the "Alfresco Developer Guide" now. I'm still not very comfortable with what I would like to do.
I suppose I've got to get into advanced workflows to send a simple e-mail to one or multiple user(s). I thought it was easier to add a script in the "Review & Approve" workflow, but I must have been mistaken. However, it seems to be a harsh process to me, since I've got not much time to obtain what I want :s…