[jbpm-dev] [Design of JBoss jBPM] - mail examples

alex.guizar@jboss.com do-not-reply at jboss.com
Tue Apr 28 04:19:44 EDT 2009


I've committed the first mail example to the jBPM 4 codebase. The example shows usage of an inline template in a mail activity. While simple, the example is fully functional and having it working is a milestone. I used the Wiser mock server to verify emails are actually sent.

Other examples will be an external template and task notifications. Here is what I like and don't like about the current implementation. Input appreciated

Like:
A) Model and distribution of responsibilites between MailTemplate, MailProducer and MailSession
B) Template and activity syntax

Dislike:
Z) The way dynamic content is produced is not really amenable to templating engines. In the case of freemarker, the whole template content should be available to the engine, and a mechanism should exist to retrieve "compiled" templates by name. Templates take context variables as input and produce a character stream. Only the resulting output should be bound to a MailTemplate object, which would require no further evaluation.
Y) Related to the above point, the output produced by the template should be in a well defined format. Right now there is the "native" format shown in the example and in MailTemplateWireBinding. Rather than brewing our own mail template format, however, we might as well use an existing one, say XMTP.
X) Templates cannot be placed in a separate document yet (Tom, would the import feature help there?)

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

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



More information about the jbpm-dev mailing list