"bradsdavis" wrote : I personally think that in an enterprise environment, the
majority of emails won't be synchronous. I think we should make it asynchronous by
default and only send synchronously when defined as such.
|
i agree.
but in development we need to go step by step.
let's first develop the synchronous mail functionality. and in a subsequent
iteration, add the ability to send them asynchronously.
and then let's work on the configuration options in the global jbpm.cfg.xml and in the
jpdl process files.
"bradsdavis" wrote : Also, I think that the content [subject, body, attachments]
should be separate from the recipients. The actual produced content may change per a
client's need.
| ...
| By making it plugable, anyone can create a producer that extends our base type and
adds attachments as needed.
|
such a framework is good and should be build before this interface. the base class should
use this MailSession to send emails. Users should be able to configure their customized
SendMail activity. The basic SendMail should be designed for inheritence and
customization.
but again. let's go step by step. let's first get the basics working and then
add the advanced features like this in subsequent iterations.
"bradsdavis" wrote : I think an activity should produce one or more emails and
send them to the mail service, which I think you are calling MailSession.
|
| So, I think the interface should look more like:
|
|
| | package org.jbpm.pvm.internal.email.service;
| |
| | import java.util.Collection;
| |
| | import org.apache.commons.mail.Email;
| |
| | public interface MailService {
| | public void send(Collection<Email> emails);
| | }
| |
|
| Because the emails at this point already have their email addresses [to, cc, bcc],
body, and attachments defined at the point they are sent to the mail service, there is no
need for the mail service to care about:
|
|
| | Mail setTo(String to);
| | Mail setCC(String cc);
| | Mail setBCC(String bcc);
| | Mail setSubject(String subject);
| | Mail setBody(String subject);
| | Mail addAttachment(String name, InputStream attachment, String mimeType);
| |
|
| It would literally just be for servicing the sending of the base class Email.
i don't see why you want to send multiple emails and get rid of the destination
properties. can you elaborate on that ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224066#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...