cancel
Showing results for 
Search instead for 
Did you mean: 

mailTask configuration

fchatzia
Champ in-the-making
Champ in-the-making
I tried to make the configurations as the guide says so, but mail task still does not work? In activiti.cfg.xml i wrote <property name="mailServerHost" value="localhost" />, i have default port 25 so i didn't put anything else into activiti.cfg.xml. I want to mention that i call the activiti process(that has the mailtask) as service from a server where the mail server is installed too and i call the process via liferayportlet.
6 REPLIES 6

jbarrez
Star Contributor
Star Contributor
Setting host and port should be enought. Do you see any exception?

fchatzia
Champ in-the-making
Champ in-the-making
No, fortunately the process engine is running on a server as java  service  and the only exception i get is remote problems. To be more  specific, i have a webapp project where there is an initiated process engine and a service which gives me the opportunity to run this engine remotely from another webapp where i can remotely startprocesses, end tasks etc . In the webapp where the process engine runs i have an activiti.cfg.xml file, which i attached, and in this file i put these statements    <property name="mailServerHost" value="********" />
     <property name="mailServerPort" value="25" />. But the mail tasks doesn't work.


here is the activiti.cfg.xml

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
 
    <!–
     This configuration file is used by the deploy target
     in the build.xml in the root of the activiti-engine-examples
     project
    
     This configuration is generated by the setup script
     If you run the cfg.create target in the setup, keep
     in mind that this file might be overwritten.
     –>
    
     <!–  MySQL Patras server config  –>        
     
     <property name="jdbcUrl" value="****************" />
  <property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
  <property name="jdbcUsername" value="root" />
  <property name="jdbcPassword" value="*******" />
  <property name="jobExecutorActivate" value="false" />
   
     <property name="mailServerHost" value="*******" />
     <property name="mailServerPort" value="25" />

    
   
      <!–  H2 localhost server config  –>
   
    <!–  <property name="databaseSchemaUpdate" value="true" />
     <property name="jdbcUrl" value="************" />
     <property name="jdbcDriver" value="org.h2.Driver" />
     <property name="jdbcUsername" value="***" />
     <property name="jdbcPassword" value="" />    
     <property name="jobExecutorActivate" value="true" /> –>
    
    
     <!– Database configurations  –>
   
   

  </bean>

</beans>

frederikherema1
Star Contributor
Star Contributor
You should be a bit more specific than "does not work". Do you see an exception when the mail-task executes, or does the mail doesn't get delivered?

fchatzia
Champ in-the-making
Champ in-the-making
It doesn't throws exception because the task never be completed

fchatzia
Champ in-the-making
Champ in-the-making
For some reason i set asynchronous property true and the task work

jbarrez
Star Contributor
Star Contributor
Very strange … that doesn't make sense really … but without much other information I'm afraid we can't be of much assistance.