[jboss-user] [jBPM Users] - Re: Logging mails in jBPM 4.0.CR1
do-not-reply at jboss.com
Thu Oct 29 08:38:54 EDT 2009
I knew I would come across this again:) This time I'd like to implement a custom mail producer that uses a java class (in this particular case a spring bean) to generate attachments. The way I imagine it to work is that a custom producer first checks for the presence of a certain name (or a custom attachment type in addition to the existing ones; url, resource and file). If the name or type is present, the producer generates the custom attachment and then calls the default mail producer's addAttachment method (super.addAttachment) to take care of the rest. I think this is a pretty generic requirement, so I would like to contribute it as an example to the Developers Guide (if I actually succeed in implementing it).
What I know up to now is that I can extend org.jbpm.pvm.internal.email.impl.MailProducerImpl, as stated in the dev guide. I'm still not sure how I actually tell jBPM to use the custom producer. Maybe someone can point me at how to get the configuration right. The other challenge is to parse the inline mail template that defines the attachments, but looking at the source code of MailProducerImpl, extracting the relevant logic from there shouldn't be a big problem.
Thanks in advanced for your help!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262937#4262937
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262937
More information about the jboss-user