[jbpm-dev] [Design of JBoss jBPM] - Re: schema for mail template and activity

alex.guizar@jboss.com do-not-reply at jboss.com
Wed Apr 15 20:49:53 EDT 2009


Examples cannot be produced at this point because the syntax and the design have not been agreed upon. Unlike other activities email has more complex setup and more moving parts. Let us focus on making the design decisions first.

There are two concepts in play.
* mail template describes the contents of an email
* mail producer takes a template as input and produces a template as output

In Brad's current model, the above concepts are treated as two parts of the same thing. The mail activity configuration is read into the fields of the mail producer, and the produce(Execution) method reads those fields to create an email.

public interface MailProducer {
  |   Email produce(Execution);
  | }

In my alternate proposal, the template is a separate entity object that represents the configuration. The template is passed to the producer to create an email. The producer thus becomes a control object: it appears to be stateless from the outside.

public interface MailProducer {
  |   Email produce(Execution, MailTemplate);
  | }

In my current conception, MailTemplate is a concrete class, as emails have a standard-defined structure. The extension points are narrowed to the producer itself.

As soon as we decide on a design, we can jump to work out examples.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225770#4225770

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225770



More information about the jbpm-dev mailing list