cancel
Showing results for 
Search instead for 
Did you mean: 

Mail-node or MailActionExecuter?

marcelogodois
Champ in-the-making
Champ in-the-making
Hi all, I'd like to know which mail service should I use in a workflow at Alfresco Enterprise 3.1?

Mail Action Executer into an event (ex.: node-enter):

Action mailAction = this.actionService.createAction(MailActionExecuter.NAME )
or a JBPM mail-node:
<mail-node name="SendEmail" to="mail@ab.com">
      <subject>
         you got mail…
      </subject>
      <text>
         xxx xxx xxxx xxx
      </text>
      <transition to="Completed"></transition>
   </mail-node>

tks  :wink:
Marcelo
3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
You can send email in workflow in task transition in following 2 ways.

1) By using AlfrescoJava Script in process defination file it self and call it on any event(ex.node enter).
2) Other way is to call Action Class which will send the email.

marcelogodois
Champ in-the-making
Champ in-the-making
Hi Mit, thank you for your answer. But this two options are concerning the Mail Action Executer.

For about mail-node? Is there anyone using it?! Is it solid?! I don't know if I correctly understood, but I've needed to do an extra configuration do make this working. Like creating a hbm.xml file, pointing to "org.jbpm.graph.node.MailNode" as follow:

<hibernate-mapping default-access="field" >
  <subclass name="org.jbpm.graph.node.MailNode" discriminator-value="M" extends="org.jbpm.graph.def.Node">
  </subclass>
and after, overiding the sessionFactoryBase bean to point to the new file. Is it correct?!

Another question: can I use a template with this kind of mail.

tks  :wink:
Marcelo

mitpatoliya
Star Collaborator
Star Collaborator
No you need not to do all this things.
For Adding action class to your workflow you just need to add mention the class in you process defination.
Its pretty straigh forward and easy approch.

Reference Link :
http://wiki.alfresco.com/wiki/WorkflowAdministration

under this refer "Action and Scripting" .