-
1. Re: send mail activity
koen.aers May 25, 2006 6:56 AM (in response to ssquare)Have a peek in the CVS. There is an implementation of the mail node already for the upcoming 3.2 releases AFAIK. You could implement such an action for any mailserver.
Regards,
Koen -
2. Re: send mail activity
walterim May 25, 2006 7:17 AM (in response to ssquare)try{ SimpleEmail email=new SimpleEmail(); final String nomeEtapa=context.getAction().getEvent().getGraphElement().getName(); email.setSubject("Etapa completada: "+nomeEtapa); email.setFrom("workflow@tcc"); email.addTo("walter@tcc"); email.setHostName("120.120.1.127"); email.setMsg("Etapa completada: "+nomeEtapa+"\n"+ "Projeto: "+context.getVariable("projeto")+"\n"+ "Caso de uso: "+context.getVariable("casoDeUso")); email.send(); } catch(Exception e){ e.printStackTrace(); }
I extracted this sample from a academic research I'm doing. You should add javamail and commons mail to you project.
Good luck,
Walter Mourão -
3. Re: send mail activity
walterim May 25, 2006 7:18 AM (in response to ssquare)I forgot to say that the code is inside an Action Handler.
-
4. Re: send mail activity
ssquare May 26, 2006 1:18 PM (in response to ssquare)Thanks eveyone for your input.
Regards
-Siv -
5. Re: send mail activity
ssquare May 26, 2006 5:36 PM (in response to ssquare)Hi,
I am able to use this snippet in a standalone java app and it works fine.
When I added this into the taskBean.java (bean for handling actions saveandclose in task.jsp) ,
public String saveAndClose() {
:
:
try{
SimpleEmail email=new SimpleEmail();
email.setSubject("NEW TASK TEST);
email.setFrom("s@abc.com");
email.addTo("t@abc.com");
email.setHostName("mail.abc.com");
email.setMsg("TESTING a NEW TASK SUBMISSION"));
email.send();
}
catch(Exception e){
e.printStackTrace();
}
:
:
it does not send any mail.
Any clue is apprreciated.
The only difference between standalone and jbpm env. is that the beans are deployed under JBOSS application server. coudl this be an issue?
Thanks
-Siv -
6. Re: send mail activity
ssquare May 26, 2006 9:51 PM (in response to ssquare)Could any one send info on how to check 3.2 send mail implementation?
Thanks
-Shiv