JBoss Community

Re: Need help implementing email attachment capability in JBPM 3

created by Alejandro Guizar in jBPM - View the full discussion

Correct me if im wrong, but JBPM 3 doesnt support attachments for the mail-node, right?

Right, it does not :(

Im not able to update to a newer version of JBPM right now so I figured I could look at how its done in JBPM 4 and use that code to extend org.jbpm.mail.Mail (see: http://docs.jboss.com/jbpm/v3.2/userguide/html_single/#customizingmailsupport). But version 3 and 4 differed a lot so I cant really see a direct way of doing this.

 

I wonder if any of you have done this before or if you perhaps have any suggestions on how to do this (ie. implement email attachment support for JBPM 3)?

The key aspect to realize is that the Mail class is a plain action handler. Setting the configuration entry jbpm.mail.class.name allows you to point to a subclass with additional fields. Unfortunately there is no way to read custom attributes into the mail delegation other than reading the process definition with a JpdlXmlReader subclass that overrides readMailDelegation(). Real bummer.

 

I recently implemented CC support in jBPM3, which suprisingly enough had not been requested earlier. If your attachment requirements are satisfied by what jBPM4 offers it should be relatively straightforward to backport the feature. If you are interested, please create a JIRA issue.

Reply to this message by going to Community

Start a new discussion in jBPM at Community