-
1. Re: Question and remark about mail-templates
sebastian.s Oct 13, 2009 1:22 PM (in response to sebastian.s)I am stuck finding the configuration file for the tomcat demo setup. Any hint is highly appreciated. Thanks.
-
2. Re: Question and remark about mail-templates
kukeltje Oct 13, 2009 5:46 PM (in response to sebastian.s)use e.g.
<import resource="jbpm.mail.templates.xml" />
in your jbpm.cfg.xml instead of embedding the templates -
3. Re: Question and remark about mail-templates
sebastian.s Oct 14, 2009 3:30 AM (in response to sebastian.s)So http://docs.jboss.org/jbpm/v4/devguide/html_single/#mailtemplates is not up to date?
In the jbpm.mail.templates.xml I directly start with the tag <mail-template> or do I need to embedd the template into <jbpm-configuration> and
<process-engine-context>? -
4. Re: Question and remark about mail-templates
sebastian.s Oct 14, 2009 3:35 AM (in response to sebastian.s)The main problem stays the same. Where to put the configuration file? I always assumed install/generated/cfg/jbpm.cfg.xml would be used in the tomcat demo setup.
-
5. Re: Question and remark about mail-templates
sebastian.s Oct 14, 2009 4:03 AM (in response to sebastian.s)Okay, the configuration file seems to reside in jbpm.cfg.jar in the lib-Folder of the Tomcat-installation? This is not documented somewhere, is it? :)
-
6. Re: Question and remark about mail-templates
sebastian.s Oct 14, 2009 4:35 AM (in response to sebastian.s)How to define mail templates in the configuration for the Tomcat demo setup:
1. Grab jbpm.cfg.jar which was created during the run of ant demo.setup.tomcat.
[list=test]
* TEST
* TEST2 -
7. Re: Question and remark about mail-templates
sebastian.s Oct 14, 2009 4:46 AM (in response to sebastian.s)Sorry for the mess. By accident I pushed Submit and not preview. Editing posts is really a feature I would highly appreciate.
Okay, how to define mail templates in the configuration for the Tomcat demo setup:
1. Grab the jbpm.cfg.jar which was created during the run of ant demo.setup.tomcat. It's in the lib-Folder of the Tomcat installation.
2. Put it in an empty directory and unjar it by using the command:jar -xfv jbpm.cfg.jar
3. Create a file named jbpm.mail.templates.xml
4. Create your template or templates in the following form inside this file:<jbpm-configuration> <process-engine-context> <mail-template name="template1"> .. </mail-template> </process-engine-context> </jbpm-configuration>
5. Add the following line in the jbpm.cfg.xml:<import resource="jbpm.mail.templates.xml" />
6. Create a new version of jbpm.cfg.jar by using the command:jar -cfmv jbpm.cfg.jar *.* ./META-INF/MANIFEST.MF
7. Replace the jbpm.cfg in your Tomcat lib-Folder with the newly created one. Don't forget to restart Tomcat.
Is there a better way to specify additional configuration settings before the jbpm.cfg.jar is created by the ant task? In build.xml you can set the property mail.smtp.host but not the from-address for example. -
8. Re: Question and remark about mail-templates
kukeltje Oct 15, 2009 1:43 PM (in response to sebastian.s)afaik, it should be sufficient to put the custom config on the classpath IN FRONT of the jar. Putting it in e.g. a war should do the trick. So no customization is needed then.
-
9. Re: Question and remark about mail-templates
sebastian.s Oct 15, 2009 2:44 PM (in response to sebastian.s)Thanks for the hint. Going to try doing it like this.
-
10. Re: Question and remark about mail-templates
kukeltje Oct 15, 2009 3:17 PM (in response to sebastian.s)oh and the docs are up to date in that regard. It is just not explicitly mentioned that you can import ALL things if you want from external files. In the generic chapter about config things it is mentioned