cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Explorer and email

houstoniasian
Champ in-the-making
Champ in-the-making
I know I will need to configure email server in activiti.cfg.xml 

However, the activiti.cfg.xml is for only when I need to use the Activiti Engine.  How do I deploy a process using Activiti Explorer that has email task?  Where do I need to tell Activiti Explorer to look for my email configuration?

Thank you,

Tan
11 REPLIES 11

houstoniasian
Champ in-the-making
Champ in-the-making
I figure it out.  This should have been documented in the Tutorial.

In tomcat\web-apps\activiti-explorer\WEB-INF\activti-standalone-context.xml, look for

  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
   <property name="dataSource" ref="dataSource" />
   <property name="transactionManager" ref="transactionManager" />
   <property name="databaseSchemaUpdate" value="true" />
   <property name="jobExecutorActivate" value="true" />
    <property name="customFormTypes">
      <list>
        <bean class="org.activiti.explorer.form.UserFormType"/>  
      </list>
    </property>

  (====This is where you add the below block====)

</bean>

add this block:

    <property name="mailServerHost" value="smtp.mail.yahoo.com" />
  <property name="mailServerPort" value="465" />
  <property name="mailServerDefaultFrom" value="xxx@yahoo.com" />
  <property name="mailServerUsername" value="xxxx@yahoo.com" />
  <property name="mailServerPassword" value="password" />
  <property name="mailServerUseSSL" value="true" />

jbarrez
Star Contributor
Star Contributor

gastonmartin
Champ in-the-making
Champ in-the-making
I'm affraid it's not very well documented.

For those people using just the activiti explorer, THERE IS NO activiti.cfg.xml.

Furthermore, the user guide states: "Following properties can be set in the activiti.cfg.xml configuration file: " but .xml files are expected to be composed of XML tags… not properties. So how are we supposed to set those properties? shall we just pick a random element name and set the properties as xml attributes?  shall we figure out to put <property> elements under some specific node element?

there is a lot of room for improvement



frederikherema1
Star Contributor
Star Contributor
There is only one bean defined in the configuration file and beans have properties, thats Java/Spring 101… Don't think we should explain any more than that, given that the user guide shows XML-code snippets how and where the process-engine properties are set. We try to keep a balance between completeness and try to prevent verboseness. The user guide is already quite a big blob of text right now, hence the balance we try to reach.

vreznikov
Champ in-the-making
Champ in-the-making
I am new to Activiti and though the balanced documentation is a wonderful idea I must confess that I was very puzzled over absence of activiti.cfg.xml in my activiti-explorer deployment. One sentence about using web-apps\activiti-explorer\WEB-INF\activti-standalone-context.xml instead of activiti.cfg.xml could have saved me a lot of time on this simple issue.
Just my 2c.
Other than this one I really like the way documentation is written.
Thank you.

mlleelle
Champ in-the-making
Champ in-the-making
Totaly agree with vreznikov !

jbarrez
Star Contributor
Star Contributor
I agree. We're always open to pull requests on github 😉
Documentation fixes are a perfect way to start contributing to an open source project!

sami789
Champ in-the-making
Champ in-the-making
I have discovered that Internet Explorer shows the scroll bar on the preview window for a process, but Chrome is temperamental in showing it.

cshar
Champ in-the-making
Champ in-the-making
Hi, I am facing a problem where I get an exception while invoking an email task. I have used following steps to deploy my application-

1. Created an activiti workflow process in eclipse juno
2. Uploaded the .bpm file, and 2 forms as a zip on activiti explorer.
3. Started the process on activiti explorer
4. While invoking an email task received following exception-
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : localhost:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
at org.apache.commons.mail.Email.send(Email.java:1267)
at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:86)
… 104 more
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
at javax.mail.Service.connect(Service.java:288)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
… 106 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSock

My activiti.cfg.xml has following properties set in eclipse project folder-

<property name="databaseSchemaUpdate" value="true"/>
  <property name="mailServerHost" value="localhost"></property>
  <property name="mailServerPort" value="25"></property>
  <property name="mailServerDefaultFrom" value=""></property>
  <property name="mailServerUsername" value=""></property>
  <property name="mailServerPassword" value=""></property>
  <property name="mailServerUseSSL" value="false"></property>

I don't know if they are actually getting reflected in my deployed code on activity explorer. Please advise I'm stuck as to if I am deploying correctly or as expected.