[
https://jira.jboss.org/browse/JBPM-2891?page=com.atlassian.jira.plugin.sy...
]
Maciej Swiderski commented on JBPM-2891:
----------------------------------------
In fact there is a way to inject custom mail producer on runtime using factory syntax.
There needs to be some additional stuff added to the CustomMailProducer class (method that
will return itself).
Here is an example how to achieve this:
<notification method="getMailProducer">
<factory><ref object="mailProducer"/></factory>
</notification>
Assumptions:
- your custom mail producer class has a method getMailProducer that returns itself of type
MailProducer
- under name 'mailProducer' there is a variable that is your custom mail producer
filled in with all required stuff such as templates or capable of fetching default
templates from the environment
I have not tried that in Spring environment but in regular one it works fine.
HTH
Custom mail producer can not be a spring bean
---------------------------------------------
Key: JBPM-2891
URL:
https://jira.jboss.org/browse/JBPM-2891
Project: jBPM
Issue Type: Patch
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.3
Reporter: Marta Psenkova
Fix For: jBPM 4.4
Attachments: custom_mail_producer_expr.pvm.r6398.patch
It is not possible to put spring beans or expressions to custom mail producer, e.g.:
<notification expr="#{jbpmCustomMailProducer}">
<field name="templateName"><string
value="planning-approval-start-notifcation"/></field>
</notification>
this won't work, because only factory or class is allowed, but not expr.
The solution here is to allow it :)
See patch attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira